Skip to content
API reference

components/tabs

Import
import * as api from "@fungi.computer/caps/components/tabs";
Kind Export Description
type alias TabsProps Props accepted by Tabs.
type alias TabsListVariant Supported tab-list presentations.
type alias TabsListProps Props accepted by TabsList.
type alias TabsTriggerProps Props accepted by TabsTrigger.
type alias TabsContentProps Props accepted by TabsContent.
constant Tabs A tab-list controller with explicit controlled or uncontrolled value state.
constant TabsList The tab-list layout for a Tabs controller.
constant TabsTrigger A selectable tab in a Tabs controller.
constant TabsContent The content panel associated with a Tabs value.

TabsPropstype alias

Section titled “TabsProps”
Signature
type TabsProps = object & HTMLAttributes<HTMLDivElement>;

Props accepted by Tabs.

Name Type Description
children ReactNode -
defaultValue? string -
onValueChange()? (value) => void Called after the active tab value changes.
value? string -

TabsListVarianttype alias

Section titled “TabsListVariant”
Signature
type TabsListVariant = "bordered" | "segmented";

Supported tab-list presentations.


TabsListPropstype alias

Section titled “TabsListProps”
Signature
type TabsListProps = object & HTMLAttributes<HTMLDivElement>;

Props accepted by TabsList.

Name Type Description
variant? TabsListVariant bordered underlines the selected tab. segmented presents a small set of equal, mutually exclusive choices as one inset control.

TabsTriggerPropstype alias

Section titled “TabsTriggerProps”
Signature
type TabsTriggerProps = object & ButtonHTMLAttributes<HTMLButtonElement>;

Props accepted by TabsTrigger.

Name Type
value string

TabsContentPropstype alias

Section titled “TabsContentProps”
Signature
type TabsContentProps = object & HTMLAttributes<HTMLDivElement>;

Props accepted by TabsContent.

Name Type
children ReactNode
forceMount? boolean
value string

Tabsconstant

Section titled “Tabs”
Signature
const Tabs: ForwardRefExoticComponent<
object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>
>;

A tab-list controller with explicit controlled or uncontrolled value state.


TabsListconstant

Section titled “TabsList”
Signature
const TabsList: ForwardRefExoticComponent<
object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>
>;

The tab-list layout for a Tabs controller.


TabsTriggerconstant

Section titled “TabsTrigger”
Signature
const TabsTrigger: ForwardRefExoticComponent<
object &
ButtonHTMLAttributes<HTMLButtonElement> &
RefAttributes<HTMLButtonElement>
>;

A selectable tab in a Tabs controller.


TabsContentconstant

Section titled “TabsContent”
Signature
const TabsContent: ForwardRefExoticComponent<
object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>
>;

The content panel associated with a Tabs value.