UI components

UI Components

Laravolt ships a complete set of Blade components built on Preline UI and Tailwind CSS (Preline 5.0 and Tailwind 4.3 since v8.1; the components were rebuilt on Preline 3 in v7). Every component supports dark mode via Tailwind dark: variants.


Basic Usage

All components use the volt prefix:

Blade
<x-volt-button variant="primary">Save Changes</x-volt-button>

Layout Components

  • <x-volt-app> — main application layout with sidebar navigation
  • <x-volt-panel> — card panel with optional header and footer
  • <x-volt-card> — clickable card component
  • <x-volt-backlink> — back navigation link

For grids, use Tailwind utilities directly:

Blade
<div class="grid grid-cols-1 gap-6 md:grid-cols-3">
  <x-volt-card title="Users" url="/users"/>
  <x-volt-card title="Roles" url="/roles"/>
  <x-volt-card title="Permissions" url="/permissions"/>
</div>

Button

Blade
<x-volt-button
    variant="primary"
    size="md"
    :loading="false"
    :pill="false"
    icon="save"
    icon-position="left"
>
    Save Changes
</x-volt-button>
  • Variants: primary, secondary, danger, success, warning, soft, outline, ghost, link
  • Sizes: 2xs, xs, sm, md, lg
  • Options: loading (shows a spinner), pill (fully rounded), icon + icon-position

Use <x-volt-link-button> for anchors styled as buttons.

Alert

Blade
<x-volt-alert type="success" size="md" :dismissable="true" :border="true">
    Data saved successfully.
</x-volt-alert>

Alerts come in sm, md, and lg sizes, with optional rounded and border styling. Dismissal uses Preline's hs-remove-element.

Blade
<x-volt-modal id="confirm-delete" size="md" :centered="true" :scrollable="false">
    <x-slot name="header">Delete User</x-slot>

    Are you sure you want to delete this user?

    <x-slot name="footer">
        <x-volt-button variant="secondary">Cancel</x-volt-button>
        <x-volt-button variant="danger">Delete</x-volt-button>
    </x-slot>
</x-volt-modal>

Sizes range from xs to 7xl. Use static to prevent closing on backdrop click. Positioning is handled by Floating UI.

Dropdowns support 12 placement positions plus strategy and auto-close options, positioned with Floating UI:

Blade
<x-volt-dropdown placement="bottom-end">
    <x-slot name="trigger">Actions</x-slot>
    <a href="#" class="...">Edit</a>
    <a href="#" class="...">Delete</a>
</x-volt-dropdown>

Switch

The Switch component was rewritten in v7 with a data-driven, button-based approach:

Blade
<x-volt-switch
    label="Enable notifications"
    description="Receive email notifications"
    :checked="true"
    size="md"
    variant="primary"
    label-position="end"
/>

Form Inputs

  • <x-volt-input> — text input with consistent focus, error, and disabled states
  • <x-volt-time-picker> — new in v7; 12h/24h formats, clearable, size variants:
Blade
<x-volt-time-picker label="Select time" format="24h" :clearable="true" size="md"/>
  • <x-volt-advanced-datepicker> — new in v7; date ranges, min/max constraints, custom formats:
Blade
<x-volt-advanced-datepicker
    label="Report period"
    :range="true"
    min-date="2026-01-01"
    format="DD-MM-YYYY"
    :clearable="true"
/>

Table and Badge

  • <x-volt-table> — styled table matching TableView and Suitable output
  • <x-volt-badge> — pill badge component

In table columns, Suitable's Label column renders a Preline pill badge. Customize colors with Tailwind utilities:

PHP
Label::make('status')->addClass('bg-teal-100 text-teal-800'),

Icons

Icons use Font Awesome 5 through Blade Icons:

Blade
<x-volt-icon name="shield"/>

The icon prefix is configured in config/laravolt/ui.php (iconset key).

Coming from v6?

Fomantic UI classes (ui button, ui grid, ui card, ...) no longer exist since v7. Use Tailwind utilities or the <x-volt-*> components above instead.

Previous
Layouts