Schema
Section
Collapsible section with heading, description, and icon. Groups child components visually. Shared schema vocabulary — the same layout renders in forms and infolists.
On this page
Collapsible section with heading, description, and icon. Groups child components visually. Shared schema vocabulary — the same layout renders in forms and infolists.
use NyonCode\WireCore\Foundation\Schema\Section;
Usage
Section::make('personal') ->label('Personal Information') ->description('Basic details about the user.') ->icon('user') ->schema([ TextInput::make('name')->required(), TextInput::make('email')->email(), ]) ->columns(2)
Collapsible
Section::make('advanced') ->label('Advanced Settings') ->collapsible() ->collapsed() // start collapsed ->schema([...])
Compact Mode
Section::make('info') ->compact() // reduced padding ->schema([...])
Aside Layout
Section::make('info') ->aside() // label on the left, content on the right ->schema([...])
Methods
| Method | Description |
|---|---|
description(string) |
Description below the heading |
icon(string) |
Icon next to the heading |
columns(int) |
Grid columns inside the section |
collapsible() |
Allow collapsing |
collapsed() |
Start collapsed |
compact() |
Reduced padding |
aside() |
Side-by-side layout |
headerActions(array) |
Actions rendered in the section header (alias for actions()) |
In forms you may also import the thin
NyonCode\WireForms\Components\Layout\Sectionalias (deprecated in v2.0). It only swaps in form-specific markup; prefer the canonical schemaSectionabove.