Tabs

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

Account

Make changes to your account here. Click save when you're done.

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 tab component parts.

Custom Attributes
NameTypeDefaultDescription
valueReactive<String>""

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.

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.