API reference
components/tabs
Import
Section titled “Import”import * as api from "@fungi.computer/caps/components/tabs";Exports
Section titled “Exports”| 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”type TabsProps = object & HTMLAttributes<HTMLDivElement>;Props accepted by Tabs.
Type Declaration
Section titled “Type Declaration”| Name | Type | Description |
|---|---|---|
children |
ReactNode |
- |
defaultValue? |
string |
- |
onValueChange()? |
(value) => void |
Called after the active tab value changes. |
value? |
string |
- |
TabsListVarianttype alias
Section titled “TabsListVariant”type TabsListVariant = "bordered" | "segmented";Supported tab-list presentations.
TabsListPropstype alias
Section titled “TabsListProps”type TabsListProps = object & HTMLAttributes<HTMLDivElement>;Props accepted by TabsList.
Type Declaration
Section titled “Type Declaration”| 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”type TabsTriggerProps = object & ButtonHTMLAttributes<HTMLButtonElement>;Props accepted by TabsTrigger.
Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
value |
string |
TabsContentPropstype alias
Section titled “TabsContentProps”type TabsContentProps = object & HTMLAttributes<HTMLDivElement>;Props accepted by TabsContent.
Type Declaration
Section titled “Type Declaration”| Name | Type |
|---|---|
children |
ReactNode |
forceMount? |
boolean |
value |
string |
Tabsconstant
Section titled “Tabs”const Tabs: ForwardRefExoticComponent< object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;A tab-list controller with explicit controlled or uncontrolled value state.
TabsListconstant
Section titled “TabsList”const TabsList: ForwardRefExoticComponent< object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;The tab-list layout for a Tabs controller.
TabsTriggerconstant
Section titled “TabsTrigger”const TabsTrigger: ForwardRefExoticComponent< object & ButtonHTMLAttributes<HTMLButtonElement> & RefAttributes<HTMLButtonElement>>;A selectable tab in a Tabs controller.
TabsContentconstant
Section titled “TabsContent”const TabsContent: ForwardRefExoticComponent< object & HTMLAttributes<HTMLDivElement> & RefAttributes<HTMLDivElement>>;The content panel associated with a Tabs value.