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
| Prop | Type | Default | Description |
|---|---|---|---|
defaultValue | string | - | The value of the tab that should be active initially |
class | string | - | Additional CSS classes |
TabsTrigger
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | The unique value of the tab |
TabsContent
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | - | The value that matches a TabsTrigger |
Accessibility
- Uses
role="tablist",role="tab", androle="tabpanel" - Properly manages
aria-selectedstates - Keyboard navigation support