Tabs

Tabs is a component for switching between different display areas.

クリリンのことか……クリリンのことかーーーっ!!!!!

Usage

import { Tabs } from "@yamada-ui/react"
<Tabs.Root>
  <Tabs.List>
    <Tabs.Tab />
  </Tabs.List>
  <Tabs.Panels>
    <Tabs.Panel />
  </Tabs.Panels>
</Tabs.Root>

Use items

クリリンのことか……クリリンのことかーーーっ!!!!!

Change Variants

クリリンのことか……クリリンのことかーーーっ!!!!!
クリリンのことか……クリリンのことかーーーっ!!!!!
クリリンのことか……クリリンのことかーーーっ!!!!!
クリリンのことか……クリリンのことかーーーっ!!!!!

Change Size

クリリンのことか……クリリンのことかーーーっ!!!!!
クリリンのことか……クリリンのことかーーーっ!!!!!
クリリンのことか……クリリンのことかーーーっ!!!!!

Select a Default Item

へっ!きたねぇ花火だ

Change Orientation

クリリンのことか……クリリンのことかーーーっ!!!!!
クリリンのことか……クリリンのことかーーーっ!!!!!

Change Alignment

クリリンのことか……クリリンのことかーーーっ!!!!!
クリリンのことか……クリリンのことかーーーっ!!!!!
クリリンのことか……クリリンのことかーーーっ!!!!!

Stretch to Container Width

クリリンのことか……クリリンのことかーーーっ!!!!!

Disable

クリリンのことか……クリリンのことかーーーっ!!!!!

Manual Activation

By default, the focused tab is automatically activated. If you want to activate the tab at a specific time (when Enter or Space is pressed), set manual to true.

クリリンのことか……クリリンのことかーーーっ!!!!!
クリリンのことか……クリリンのことかーーーっ!!!!!

Lazy Rendering

クリリンのことか……クリリンのことかーーーっ!!!!!
クリリンのことか……クリリンのことかーーーっ!!!!!

Dynamic Tabs

Tab Content 53d49bc4-cf56-4fc9-080f-c45103a5086c

index: 0

id: 53d49bc4-cf56-4fc9-080f-c45103a5086c

Customize Tabs

クリリンのことか……クリリンのことかーーーっ!!!!!

Control

クリリンのことか……クリリンのことかーーーっ!!!!!

Props

Accessibility

Tabs follows the WAI-ARIA - Tabs Pattern for accessibility.

Keyboard Navigation

KeyDescriptionState
TabFocuses the active tab when focus moves to the tab list. Moves focus to the tab panel if already within the tab list.-
ArrowLeftFocuses the previous tab that is not disabled. If it's the first tab, focuses the last tab that is not disabled.orientation="horizontal"
ArrowRightFocuses the next tab that is not disabled. If it's the last tab, focuses the first tab that is not disabled.orientation="horizontal"
ArrowUpFocuses the previous tab that is not disabled. If it's the first tab, focuses the last tab that is not disabled.orientation="vertical"
ArrowDownFocuses the next tab that is not disabled. If it's the last tab, focuses the first tab that is not disabled.orientation="vertical"
Space, EnterActivates the focused tab.manual={true}
HomeFocuses the first tab that is not disabled.-
EndFocuses the last tab that is not disabled.-

ARIA Roles and Attributes

ComponentRoles and AttributesUsage
Tabs.Listrole="tablist"Indicates that this is a tab list.
aria-orientationSets to "horizontal" or "vertical" based on orientation. The default is "horizontal".
Tabs.Tabrole="tab"Indicates that this is a tab.
aria-selectedSets to "true" when the tab is selected, "false" when not selected.
aria-controlsSets the id of the associated Tabs.Panel.
Tabs.Panelrole="tabpanel"Indicates that this is a tab panel.
aria-labelledbySets the id of the associated Tabs.Tab.

Similar Components

Breadcrumb

Breadcrumb is a component that helps users understand the hierarchy of a website.

NativeAccordion

NativeAccordion is a component for a list that displays information in an expandable or collapsible manner using the HTML details element.

Pagination

Pagination is a component for managing the pagination and navigation of content.

Accordion

Accordion is a component for a list that displays information in an expandable or collapsible manner.

Steps

Steps is a component that displays the progress of a multi-step process.

Menu

Menu is a component that displays a common dropdown menu.

Select

Select is a component used for allowing a user to choose values from a list of options.

Uses Components & Hooks