GitHub

/ tabs

Tabs

@kumiki/headless/tabs

Svelte 5 attachments for Tabs — list / tab / panel factories with orientation + RTL keyboard handling.

This component, layer by layer

Styled, copy-paste presets (preview). Run pnpm kumiki add to drop the source into your project, then edit freely.

Live preview

Live preview…

Install
pnpm add @kumiki/atelier
Settings tabs
<script lang="ts">
  import { Tailwind as Tabs } from '@kumiki/atelier/tabs';
  import type { TabItem } from '@kumiki/components/tabs';

  const items: TabItem[] = [
    { id: 'account',  value: 'account',  label: 'Account' },
    { id: 'team',     value: 'team',     label: 'Team' },
    { id: 'security', value: 'security', label: 'Security' },
  ];
</script>

<Tabs.Root {items} defaultValue="account">
  <Tabs.List>
    {#each items as t (t.id)}<Tabs.Tab value={t}>{t.label}</Tabs.Tab>{/each}
  </Tabs.List>
  <Tabs.Panel value={items[0]!}></Tabs.Panel>
  <Tabs.Panel value={items[1]!}></Tabs.Panel>
  <Tabs.Panel value={items[2]!}></Tabs.Panel>
</Tabs.Root>

/ accessibility

Accessibility

axe-core — run on every PR (LTR + RTL × every documented state).

Keyboard

KeyEffect
Arrow ←/→Move focus to adjacent tab.
Home / EndFirst / last tab.
Enter, SpaceActivate the focused tab (manual mode).

Test discipline

  • axe-core — run on every PR (LTR + RTL × every documented state).
  • APG keyboard tests — Playwright, hand-written per pattern.
  • VoiceOver / NVDA — Guidepup nightly schedule.
  • Type-level required names — title / aria-label / aria-labelledby.
Read the W3C ARIA APG pattern ↗