K

Fields

Section

Collapsible section with heading, description, and icon. Groups fields visually.

Collapsible section with heading, description, and icon. Groups fields visually.

use NyonCode\WireForms\Components\Layout\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