Leave Yamada UI a star

Star
Yamada UIYamada UIv1.7.2

Tabs

Tabs is a component for switching between different display areas.

Source@yamada-ui/tabs

Props

TabProps

clickOnEnter

Description

Whether or not trigger click on pressing Enter.

Type

boolean

Default

true

clickOnSpace

Description

Whether or not trigger click on pressing Space.

Type

boolean

Default

true

disableTouchBehavior

Description

Disable the touch device behavior.

Type

boolean

Default

true

focusable

Description

If true and isDisabled, the element will have only aria-disabled set to true.

Type

boolean

Default

false

focusOnClick

Description

Whether or not to focus the element when it is clicked. If true, the element will receive focus upon click.

Type

boolean

Default

true

isDisabled

Deprecated

Description

If true, the element will be disabled. It will set the disabled HTML attribute.

Deprecated

Use disabled instead.

Type

boolean

Default

false

isFocusable

Deprecated

Description

If true and isDisabled, the element will have only aria-disabled set to true.

Deprecated

Use focusable instead.

Type

boolean

Default

false

ref

Description

The ref for the element.

Type

type ONLY_FOR_FORMAT = | ((instance: HTMLButtonElement | null) => void) | RefObject<HTMLButtonElement>

TabListProps

TabPanelProps

TabPanelsProps

TabsProps

align

Description

The alignment of the tabs.

Type

"center" | "end" | "start"

colorScheme

Description

The visual color appearance of the component.

Type

"blackAlpha" | "whiteAlpha" | "amber" | "blue" | "info" | "link" | "primary" | "cyan" | "emerald" | "flashy" | "fuchsia" | "gray" | "green" | "success" | "indigo" | "lime" | "neutral" | "orange" | "warning" | "pink" | "purple" | "red" | "danger" | "rose" | "sky" | "teal" | "violet" | "secondary" | "yellow"

Default

"primary"

defaultIndex

Description

The index of the selected tab.

Type

number

disableRipple

Description

If true, disable ripple effects when pressing the tab.

Type

boolean

Default

false

fitted

Description

If true, tabs will stretch to width of the tablist.

Type

boolean

Default

false

index

Description

The index of the selected tab.

Type

number

isFitted

Deprecated

Description

If true, tabs will stretch to width of the tablist.

Deprecated

Use fitted instead.

Type

boolean

Default

false

isLazy

Deprecated

Description

If true, rendering of the tab panel's will be deferred until it is selected.

Deprecated

Use lazy instead.

Type

boolean

Default

true

isManual

Deprecated

Description

If true, the tabs will be manually activated and display its panel by pressing Space or Enter. If false, the tabs will be automatically activated and their panel is displayed when they receive focus.

Deprecated

Use manual instead.

Type

boolean

Default

false

lazy

Description

If true, rendering of the tab panel's will be deferred until it is selected.

Type

boolean

Default

true

lazyBehavior

Description

The lazy behavior of tab panels' content when not active. Only works when isLazy={true}. - unmount: The content of inactive tab panels are always unmounted. - keepMounted: The content of inactive tab panels is initially unmounted, but stays mounted when selected.

Type

LazyMode

Default

'unmount'

manual

Description

If true, the tabs will be manually activated and display its panel by pressing Space or Enter. If false, the tabs will be automatically activated and their panel is displayed when they receive focus.

Type

boolean

Default

false

onChange

Description

The callback invoked when the index changes.

Type

(index: number) => void

orientation

Description

The orientation of the tab list.

Type

"horizontal" | "vertical"

Default

'horizontal'

size

Description

The size of the Tabs.

Type

"sm" | "md" | "lg"

Default

"md"

tabListProps

Description

Props for tab list component.

Type

TabListProps

tabPanelsProps

Description

Props for tab panels components.

Type

TabPanelsProps

variant

Description

The variant of the Tabs.

Type

"line" | "rounded" | "rounded-solid" | "rounded-subtle" | "sticky" | "sticky-solid" | "sticky-subtle" | "unstyled"

Default

"line"

Edit this page on GitHub

PreviousAccordionNextTree