Tabs
Tabs Primitive
Text Component
Demo
A collection of layered content sections, referred to as tab panels, displayed individually.
Installation
Copy/paste the following code to ~/components/ui/tabs.tsx
:
Usage
Props
Tabs
Extends View
props
Prop | Type | Note |
---|---|---|
value | string | |
onValueChange | (value: string ) => void | |
asChild | boolean | (optional) |
disabled | boolean | (optional) |
orientation | ’horizontal’ | ‘vertical’ | Web Only (optional) |
dir | ’ltr’ | ‘rtl’ | Web Only (optional) |
activationMode | ’automatic’ | ‘manual’ | Web Only (optional) |
TabsList
Extends View
props
Prop | Type | Note |
---|---|---|
asChild | boolean | (optional) |
TabsTrigger
Extends Pressable
props
Prop | Type | Note |
---|---|---|
asChild | boolean | (optional) |
TabsContent
Extends View
props
Prop | Type | Note |
---|---|---|
value | string | |
forceMount | boolean | (optional) |
asChild | boolean | (optional) |