Skip to content

components/tabs

@fungi.computer/caps


@fungi.computer/caps / components/tabs

TabsProps = object & HTMLAttributes<HTMLDivElement>>

Props accepted by Tabs.

children: ReactNode

optional defaultValue?: string

optional onValueChange?: (value) => void

Called after the active tab value changes.

string

void

optional value?: string


TabsListVariant = "bordered" | "segmented"

Supported tab-list presentations.


TabsListProps = object & HTMLAttributes<HTMLDivElement>>

Props accepted by TabsList.

optional variant?: TabsListVariant

bordered underlines the selected tab. segmented presents a small set of equal, mutually exclusive choices as one inset control.


TabsTriggerProps = object & ButtonHTMLAttributes<HTMLButtonElement>>

Props accepted by TabsTrigger.

value: string


TabsContentProps = object & HTMLAttributes<HTMLDivElement>>

Props accepted by TabsContent.

children: ReactNode

optional forceMount?: boolean

value: string

const Tabs: ForwardRefExoticComponent<object & HTMLAttributes<HTMLDivElement> > & RefAttributes<HTMLDivElement>>>>

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


const TabsList: ForwardRefExoticComponent<object & HTMLAttributes<HTMLDivElement> > & RefAttributes<HTMLDivElement>>>>

The tab-list layout for a Tabs controller.


const TabsTrigger: ForwardRefExoticComponent<object & ButtonHTMLAttributes<HTMLButtonElement> > & RefAttributes<HTMLButtonElement>>>>

A selectable tab in a Tabs controller.


const TabsContent: ForwardRefExoticComponent<object & HTMLAttributes<HTMLDivElement> > & RefAttributes<HTMLDivElement>>>>

The content panel associated with a Tabs value.