Components/Tabs

Search documentation

Jump to any guide or component.

↑↓ move · Enter open · Esc close

Navigation · Tabs + Tab + TabPanel

SSR NativeAccessible

Tabs

Switches between related panels with complete keyboard navigation.

Live previewv0.1.4

General workspace settings are visible.

Security settings are visible.

Astro
---
import { Tabs, Tab, TabPanel } from '@charvesta/cetha';
---

<Tabs id="settings" value="general" label="Settings">
  <Tab slot="list" tabsId="settings" value="general" active>General</Tab>
  <Tab slot="list" tabsId="settings" value="security">Security</Tab>
  <TabPanel tabsId="settings" value="general">General settings</TabPanel>
  <TabPanel tabsId="settings" value="security">Security settings</TabPanel>
</Tabs>

API reference

PropTypeDefaultDescription
id*stringShared Tabs identifier.
value*stringInitial active value.
label*stringAccessible tab list label.
tabsId*stringTab and TabPanel parent identifier.
activebooleanfalseMarks the initial active Tab.
classstringAdditional classes forwarded to the rendered element.

Accessibility

Arrow keys move focus and selection; Home and End jump to the first or last tab.