Skip to content
See live

Sections

A Section renders as a Material card. Default: the panel's own pane tone, which is already Material's filled card on the surface a page frames its content with.

Variants

VariantMaterial nameModifierContainerElevation
(default)Filled card, on the pane tonenonesurface-container-low0
ElevatedElevated card->elevated()surface-container-low1
FilledFilled card->filled()surface-container-highest0
OutlinedOutlined card->outlined()surface, with a 1dp outline0

Default

A card on the panel's resting content toneA card on the panel's resting content tone
php
use Filament\Schemas\Components\Section;

Section::make('Details')->schema([
    // ...
]);

Elevated

A card raised off the page by a shadowA card raised off the page by a shadow
php
Section::make('Details')->elevated();

Filled

A strongly tinted card with no shadowA strongly tinted card with no shadow
php
Section::make('Details')->filled();

Outlined

A card with a hairline borderA card with a hairline border
php
Section::make('Details')->outlined();

variant() takes the same set by name, for when the variant is data:

php
use Saade\FilamentMaterialTheme\Enums\CardVariant;

Section::make('Details')->variant(CardVariant::Elevated);
Section::make('Details')->variant('elevated');
CaseValue
CardVariant::Elevatedelevated
CardVariant::Filledfilled
CardVariant::Outlinedoutlined

Combining

php
Section::make('Shipping')
    ->description('Where this order is going.')
    ->outlined()
    ->columns(2)
    ->collapsible()
    ->schema([
        TextInput::make('street'),
        TextInput::make('city'),
    ]);

The heading is title-medium and the description body-medium on the variant ink. A collapse control is an icon button with a state layer.

Where else the variants apply

Registered on Filament\Schemas\Components\Component, which nearly everything in a schema descends from. Three of those render the variant:

On anything else the class is set but nothing is drawn from it.

On a field, these mean the text input

A Field descends from the same component, and Filament's macro lookup takes the closest registration, so TextInput::make('x')->outlined() is the outlined text input, not an outlined card. filled() on a field is Filament's validation rule, which is why the filled field is filledField().

Filament compatibility

heading(), description(), icon(), collapsible(), collapsed(), compact(), columns(), columnSpan(), aside(), footer(), visible() and extraAttributes() all behave as they do without the theme. The variant is carried in the same attribute bag extraAttributes() writes to, and merges rather than replaces, so both can be used on one component.

API

MethodOnResult
elevated()ComponentElevated card
filled()ComponentFilled card
outlined()ComponentOutlined card
variant(CardVariant|string)ComponentAny of the above by name