Docs Hub

🇮🇷
iran mirrors
LaravelLaravelLivewireLivewireAlpine.jsAlpine.jsNext.jsNext.jsVue.jsVue.jsZustandZustandNuxt.jsNuxt.jsFilamentFilament
BootstrapBootstrap
Nest.jsNest.js
ReactReact
Vite.jsVite.js
Tailwind CSSTailwind CSS

© 2026 Juza66 and Arash Fadaee

Docs Hub

🇮🇷 iran mirrorsActionsAGENTSAlpineAttribute AsyncAttribute ComputedAttribute DeferAttribute IsolateAttribute JsAttribute JsonAttribute LayoutAttribute LazyAttribute LockedAttribute ModelableAttribute OnAttribute ReactiveAttribute RenderlessAttribute SessionAttribute TitleAttribute TransitionAttribute UrlAttribute ValidateBest PracticesBlade ComponentsBundlingComponent HooksComponentsComputed PropertiesContribution GuideCspDirective IslandDirective PersistDirective PlaceholderDirective TeleportDirtyDownloadsEventsFormsHow Livewire WorksHydrationInstallationIslandsJavascriptLazyLifecycle HooksLoading StatesLockedMorphNavigateNestingOfflinePackagesPagesPaginationPollingPropertiesQuickstartRedirectingSecuritySession PropertiesStylesSynthesizersTeleportTestingThe Livewire ProtocolTroubleshootingUnderstanding NestingUndocumented Features TodoUpgrade Guide Scratch FileUpgradingUploadsUrlValidationVoltWire BindWire ClickWire CloakWire ConfirmWire CurrentWire DirtyWire IgnoreWire InitWire IntersectWire LoadingWire ModelWire NavigateWire OfflineWire PollWire RefWire ReplaceWire ShowWire SortWire StreamWire SubmitWire TextWire Transition
Docs Hub

wire:bind is a directive that dynamically binds HTML attributes to component properties or expressions. Unlike using Blade's attribute syntax, wire:bind updates the attribute reactively on the client without requiring a full re-render.

If you are familiar with Alpine's x-bind directive, the two are essentially the same.

Basic usage

blade
<input wire:model="message" wire:bind:class="message.length > 240 && 'text-red-500'">

As the user types, wire:bind:class reacts to the message length and applies the class instantly on the client.

Common use cases

Binding styles

blade
<div wire:bind:style="{ 'color': textColor, 'font-size': fontSize + 'px' }">
    Styled text
</div>

Binding href

blade
<a wire:bind:href="url">Dynamic link</a>

Binding disabled state

blade
<button wire:bind:disabled="isArchived">Delete</button>

Binding data attributes

blade
<div wire:bind:data-count="count">...</div>

Reference

blade
wire:bind:{attribute}="expression"

Replace {attribute} with any valid HTML attribute name (e.g., class, style, href, disabled, data-*).

This directive has no modifiers.