Tabs
StorybookA set of layered sections of content — known as tab panels — that are displayed one at a time. Demonstrated in all state modes plus patch mode.
Client-only Tabs
No server events. Tab switching happens purely via JavaScript — zero latency.
Account
Make changes to your account here. Click save when you're done.
Password
Change your password here. After saving, you'll be logged out.
Notifications
Configure how you receive notifications.
Line Variant
The line variant uses an underline indicator instead of a background pill. The ::after pseudo-element provides the active underline.
Project overview with key metrics and recent activity.
Detailed analytics and performance data.
Generated reports and exports.
This tab is disabled and shouldn't be reachable.
Vertical Orientation
Set orientation="vertical" for side-by-side layout. Arrow keys switch from horizontal (Left/Right) to vertical (Up/Down).
General Settings
Manage your workspace name, description, and default preferences.
Security
Configure two-factor authentication and session management.
Integrations
Connect third-party services and manage API keys.
Billing
View invoices, manage payment methods, and update your plan.
Hybrid
JS switches tabs instantly for responsiveness, then pushes the event to the server. The event log below updates via LiveView.
Content for the first tab.
Content for the second tab.
Content for the third tab.
Server-controlled
The server owns the state. Use the buttons below to control the active tab externally. Content panels use :if — only the active panel is in the DOM.
Account
Server-rendered account settings. Only this panel is in the DOM.
"account"
Push Event (Server → Client)
The server pushes commands to a client-mode tabs via push_event/3. The tabs have no value or on_value_change — they're client-only, but the server can still command them.
Your music library.
Your podcast subscriptions.
Your audiobook collection.
Patch Mode — Path Params
Triggers render as link patches instead of buttons. The URL updates to /showcase/tabs/:tab and handle_params/3 reads the active tab from the path. Supports browser back/forward navigation.
"overview"
Patch Mode — Query Params
Same pattern but with query parameters: /showcase/tabs?tab=.... Useful when you want tabs on a page without changing the route path.
"overview"