Tabs
Tabs is part of the Disclosure and overlays group. Canonical reference component for switching between related panels.
Installation
Section titled “Installation”npx bambiui add tabs --framework reactnpx bambiui add tabs --framework solidnpx bambiui add tabs --framework sveltenpx bambiui add tabs --framework vueimport { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";
export function Example() { return <Tabs />;}import { Tabs, TabsList, TabsTrigger, TabsContent } from "~/components/ui/tabs";
export function Example() { return <Tabs />;}<script lang="ts"> import { Tabs, TabsList, TabsTrigger, TabsContent } from "$lib/components/ui/tabs";</script>
<Tabs /><script setup lang="ts">import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";</script>
<template> <Tabs /></template>Preview
Section titled “Preview”
Tabs preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.
Behavior
Section titled “Behavior”Use when panels are peers at the same hierarchy level.
Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.
Accessibility
Section titled “Accessibility”Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Tabs. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.
Exports
Section titled “Exports”Tabs, TabsList, TabsTrigger, TabsContentTokens
Section titled “Tokens”Customize tokens after installing and previewing the component. Relevant tokens include:
--bambi-intent-primary-bg--bambi-background--bambi-border