Introduction
Filament provides powerful layout components to organize your form fields. Layout components are found in theFilament\Schemas\Components namespace and can be nested to create complex form structures.
Grid
The grid component allows you to arrange fields in columns:Responsive columns
You can specify different column counts for different breakpoints:Column spans
Control how many columns a field occupies:Section
Sections group related fields with an optional heading and description:Collapsible sections
Make sections collapsible to save space:Section icons
Add icons to section headings:Compact sections
Remove section padding for a more compact layout:Aside sections
Display sections as aside content:Fieldset
Fieldsets are simpler alternatives to sections:Tabs
Organize fields into tabs:Tab badges
Add badges to tabs:Active tab
Set the default active tab:Persisting tabs
Persist the active tab in the URL query string:Wizard
Create multi-step forms with wizards:Skippable steps
Allow users to skip optional steps:Step completion validation
By default, users must complete all fields in a step before proceeding. You can customize this behavior per step:Group
Group fields without visual styling:Fused Group
Visually fuse fields together:Flex
Use flexbox layout for fine-grained control:Inline labels
Display field labels inline with the inputs:Nested layouts
Layout components can be nested to create complex structures:Custom spacing
Control spacing between components:Conditionally hiding layout components
Layout components support the same visibility methods as fields:Actions in layouts
Add actions to section headers:Best practices
Organization
- Use sections to group related fields logically
- Use tabs when you have distinct categories of information
- Use wizards for multi-step processes or complex forms
Responsiveness
- Always consider mobile layouts
- Use responsive column configurations
- Test your forms on different screen sizes
Performance
- Avoid deeply nested layouts when possible
- Use collapsed sections for less frequently accessed fields
- Consider using tabs to reduce initial page load
Accessibility
- Provide clear, descriptive section headings
- Use descriptions to provide additional context
- Ensure logical tab order through your form
Next steps
- Validation - Add validation rules to your fields
- Advanced Features - Learn about reactive and dependent fields