Skip to main content Skip to navigation

Components: Section

How to use

A component to display a section with a title and a list of sub-components.

Section::make()
    ->title('Contact information')
    ->button(Btn::make())
    ->collapsible()
    ->components([/* ... */])

Available methods

title(string $title): static

Set the section's title.

Section::make()
    ->title('John Doe');

button(Component $button): static

Set the section's top right button.

Section::make()
    ->button(Btn::make());

collapsible(bool $collapsible): static

Make the section collapsible.

Section::make()
    ->collapsible();

Inherited methods

The Section component extends the base component and inherits all of its methods.

It also inherits the methods from the following traits: