Tabs

A set of layered sections of content—known as tab panels—that are displayed one at a time.

Overview

View your key metrics and recent project activity. Track progress across all your active projects.

You have 12 active projects and 3 pending tasks.

Line

Use the line variant for a line style.

Vertical

Use the vertical orientation for vertical tabs.

Disabled

Icons

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::tabs::*;

#[component]
pub fn TabsAnatomy() -> impl IntoView {
    view! {
        <Tabs>
            <TabsList>
                <TabsTrigger />
            </TabsList>
            <TabsContent />
        </Tabs>
    }
}

API Reference

Tabs

Contains all the tabs component parts.

Custom Attributes
NameTypeDefaultDescription
orientationString"horizontal"

Set which direction the tabs should flow. Accepted values: "horizontal" | "vertical".

valueString""

Reactive signal coupled to the `value` of the current selected tab.

Implements global attributes.

TabsContent

Contains the content associated with each trigger.

Custom Attributes
NameTypeDefaultDescription
valueString""

This tab's trigger value.

Implements global attributes.

TabsList

Contains the triggers that are aligned along the edge of the active content.

Custom Attributes
NameTypeDefaultDescription
variantString"default"

Set the display variant of the tab buttons. Accepted values: "default" | "line".

Implements global attributes.

TabsTrigger

The button that activates its associated content.

Custom Attributes
NameTypeDefaultDescription
valueString""

The value of the tab that this button triggers.

Implements global and button attributes.