页面 · Laravilt
Tabs
Organize components into tabbed panels.
Organizes components into tabbed panels.
Basic usage
php
A tab's label defaults to its name. Override it with label().
Active tab and URL persistence
php
API reference
Tabs
| Method | Description |
|---|---|
make(string) | Create (name required) |
tabs(array) | Tab instances |
activeTab(int) | Initially active tab |
persistTabInQueryString(bool) | Keep the active tab in the URL |
Tab
| Method | Description |
|---|---|
make(string) | Create; the name becomes the label |
label(string|Closure) | Tab label |
icon(string|Closure) | Lucide icon |
badge(string|Closure) | Badge text |
schema(array) | Tab content |
Laravilt\Schemas\Components\Tabs\Tab is an alias of Tab.