Skip to content

Form layouts

Field, Fieldset, Container, Section, and Grid layout components.

Form layouts organize inputs in the admin UI. All layouts use ::make() and ->components([...]).

Field

Wraps a single input:

Field::make('title')
    ->label('Title')
    ->input(TextInput::make('title')),

Namespace: Streams\Ui\Builders\Forms\Layouts\Field

Fieldset

Groups related fields:

Fieldset::make('Meta')->components([
    Field::make('slug')->input(TextInput::make('slug')),
]),

Container

Generic wrapper for nested components:

Container::make()->components([/* ... */]),

Section and Grid

Use container builders from Streams\Ui\Builders\Containers:

Section::make('Details')->components([
    Grid::make()->columns(2)->components([
        Field::make('first_name')->input(TextInput::make('first_name')),
        Field::make('last_name')->input(TextInput::make('last_name')),
    ]),
]),

Tabs

Tab navigation uses Streams\Ui\Builders\Navigation\Tabs for multi-section forms.

Related