- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Banner
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Command
- Collapsible
- Combobox
- Context Menu
- Data Table
- Date Picker
- Dialog
- Dropdown Menu
- Editor
- Input
- Input Group
- Label
- Loading Spinner
- Native Select
- Popover
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Steps
- Switch
- Tabs
- Textarea
- Tooltip
Steps
Shows progress through a sequence of tasks with completed, active, and inactive states.
@php $steps = [ ['value' => 1, 'label' => 'Account', 'description' => 'Create your account'], ['value' => 2, 'label' => 'Profile', 'description' => 'Add your details'], ['value' => 3, 'label' => 'Review', 'description' => 'Confirm your choices'], ];@endphp <april:steps :items="$steps" current="2" />
@php $steps = [ ['value' => 1, 'label' => 'Account', 'description' => 'Create your account'], ['value' => 2, 'label' => 'Profile', 'description' => 'Add your details'], ['value' => 3, 'label' => 'Review', 'description' => 'Confirm your choices'], ];@endphp <april:steps :items="$steps" current="2" />
Usage
Pass an array of steps and the active step to the component. Numeric values are used by default to derive the state: steps before the active step are completed, the active step is highlighted, and later steps are inactive.
@php $steps = [ ['value' => 1, 'label' => 'Account'], ['value' => 2, 'label' => 'Profile'], ['value' => 3, 'label' => 'Review'], ];@endphp <april:steps :items="$steps" current="2" />
Step data
Each step accepts a
value,
label, optional
description, and optional
href. A completed step with an
href is rendered as a link.
Use
state when the state does not follow the numeric order. Supported values are
completed,
active, and
inactive.
Vertical steps
Set
orientation to
vertical for a stacked layout. This works well when each step has a description or when the available width is limited.
@php $steps = [ ['value' => 1, 'label' => 'Account', 'description' => 'Create your account', 'href' => '#account'], ['value' => 2, 'label' => 'Profile', 'description' => 'Add your details'], ['value' => 3, 'label' => 'Preferences', 'description' => 'Choose your settings'], ['value' => 4, 'label' => 'Review', 'description' => 'Confirm your choices'], ];@endphp <april:steps orientation="vertical" :items="$steps" current="2" />
@php $steps = [ ['value' => 1, 'label' => 'Account', 'description' => 'Create your account', 'href' => '#account'], ['value' => 2, 'label' => 'Profile', 'description' => 'Add your details'], ['value' => 3, 'label' => 'Preferences', 'description' => 'Choose your settings'], ['value' => 4, 'label' => 'Review', 'description' => 'Confirm your choices'], ];@endphp <april:steps orientation="vertical" :items="$steps" current="2" />
<april:steps orientation="vertical" :items="$steps" current="2" />
Publishing Views
Use the following command to publish this view:
php artisan april:publish steps
php artisan april:publish steps
php artisan april:publish --all
php artisan april:publish --all