Skip to main content Skip to navigation

Components: HasLabel

How to use

Components that use this trait allow you to configure a Label component.

Component::make()
    ->label('Date of birth');

Available methods

label(string|Hiker\Components\Label\Label $label): static

Set the label. Accepts a string or a Label component instance.

Component::make()
    ->label(
        Label::make('Date of birth')
            ->position(LabelPosition::Left)
            ->icon('calendar')
    );