TuMarca

Tabs

A set of layered sections of content—known as tab panels—that are displayed one at a time.

stable
Tipo: ui
Versión: 1.0.0
navigation tabs navigation panels interactive

Comparación entre la versión Astro (Saastro) y React (shadcn/ui)

🚀 saastro/ui (Astro)
⚛️ shadcn/ui (React)

Installation

Usage

---
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui-saastro/tabs"
---

<Tabs defaultValue="account">
  <TabsList>
    <TabsTrigger value="account">Account</TabsTrigger>
    <TabsTrigger value="password">Password</TabsTrigger>
  </TabsList>
  <TabsContent value="account">Account content here.</TabsContent>
  <TabsContent value="password">Password content here.</TabsContent>
</Tabs>

Props

Tabs

PropTypeDefaultDescription
defaultValuestring-The value of the tab that should be active initially
classstring-Additional CSS classes

TabsTrigger

PropTypeDefaultDescription
valuestring-The unique value of the tab

TabsContent

PropTypeDefaultDescription
valuestring-The value that matches a TabsTrigger

Accessibility

  • Uses role="tablist", role="tab", and role="tabpanel"
  • Properly manages aria-selected states
  • Keyboard navigation support