Flux 不是一组 UI Blade 组件,而是一个由这些组件组成的系统。该系统的设计受一系列原则引导;当你遵循这些原则时,将获得更干净、更具创造性且更直观的应用构建体验。
<flux:input wire:model="email" label="Email" />
<flux:form.field> <flux:form.field.label>Email</flux:form.field.label> <div> <flux:form.field.text-input wire:model="email" /> </div> @error('email') <p class="mt-2 text-red-500 dark:text-red-400 text-xs">{{ $message }}</p> @enderror</flux:form.field>
<flux:input wire:model="email" label="Email" />
<flux:field> <flux:label>Email</flux:label> <flux:input wire:model="email" /> <flux:error name="email" /></flux:field>
<flux:button>Options</flux:button>
<flux:dropdown> <flux:button>Options</flux:button> <flux:navmenu> <!-- ... --> </flux:navmenu></flux:dropdown>
<flux:dropdown> <flux:button>Options</flux:button> <flux:menu> <!-- ... --> </flux:menu></flux:dropdown>
<flux:context> <flux:button>Options</flux:button> <flux:menu> <!-- ... --> </flux:menu></flux:context>
<flux:heading>...</flux:heading><flux:menu.submenu heading="..."><flux:accordion.heading>...</flux:accordion.heading>
<flux:input>
<flux:dropdown> <flux:button>Options</flux:button> <flux:menu> <!-- ... --> </flux:menu></flux:dropdown>
<flux:dropdown-menu> <flux:dropdown-menu.button>Options</flux:dropdown-menu.button> <flux:dropdown-menu.items> <!-- ... --> </flux:dropdown-menu.items></flux:dropdown-menu>
<div popover> <!-- ... --></div>
<dialog> <!-- ... --></dialog>
<flux:command.input placeholder="Search..." />
[&:has(+input:focus)]:text-zinc-800
<form wire:submit="createAccount"> <div class="mb-6"> <flux:heading>Create an account</flux:heading> <flux:text class="mt-2">We're excited to have you on board.</flux:text> </div> <flux:input class="mb-6" label="Email" wire:model="email" /> <div class="mb-6 flex *:w-1/2 gap-4"> <flux:input label="Password" wire:model="password" /> <flux:input label="Confirm password" wire:model="password_confirmation" /> </div> <flux:button type="submit" variant="primary">Create account</flux:button></form>