Páginas · Laravilt
Form Inputs
The input, select, checkbox and switch primitives for hand-built forms in your own pages.
Resource forms are built in PHP with the Forms package and rendered for you. The primitives on these pages are for hand-built Inertia pages. They are the shadcn components published into resources/js/components/ui/.
React support requires Laravilt v1.1 or later.
| Primitive | Import | Page |
|---|---|---|
| Input | @/components/ui/input | Input |
| Select | @/components/ui/select | Select |
| Checkbox | @/components/ui/checkbox | Checkbox |
| Switch | @/components/ui/switch | Switch |
| Label | @/components/ui/label | Used on every page |
| Textarea | @/components/ui/textarea | Same API as Input |
| RadioGroup | @/components/ui/radio-group | RadioGroup + RadioGroupItem |
The shell also ships an InputError component (@/components/InputError.vue / @/components/input-error) that displays a validation message.
Example with Inertia useForm
vue
tsx
Related
- UI Components
- Forms (the PHP form builder;
php artisan make:form-componentcreates custom field types)