ReScript Shadcn
Get started
  • Installation
Components
  • Accordion
  • Alert
  • AlertDialog
  • AspectRatio
  • Attachment
  • Avatar
  • Badge
  • Breadcrumb
  • Bubble
  • Button
  • ButtonGroup
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • ContextMenu
  • DataTable
  • DatePicker
  • Dialog
  • Direction
  • Drawer
  • DropdownMenu
  • Empty
  • Field
  • HoverCard
  • Input
  • InputGroup
  • InputOtp
  • Item
  • Kbd
  • Label
  • Marker
  • Menubar
  • Message
  • MessageScroller
  • NativeSelect
  • NavigationMenu
  • Pagination
  • Popover
  • Progress
  • RadioGroup
  • Resizable
  • ScrollArea
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Sonner
  • Spinner
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toast
  • Toggle
  • ToggleGroup
  • Tooltip
  • Typography

Tabs

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

Overview
View your key metrics and recent project activity. Track progress across all your active projects.
You have 12 active projects and 3 pending tasks.

Installation#

npx shadcn@latest add @rescript-shadcn/Tabs

Usage#

<Tabs defaultValue="account" className="w-[400px]">
  <Tabs.List>
    <Tabs.Trigger value="account"> {"Account"->React.string} </Tabs.Trigger>
    <Tabs.Trigger value="password"> {"Password"->React.string} </Tabs.Trigger>
  </Tabs.List>
  <Tabs.Content value="account"> {"Make changes to your account here."->React.string} </Tabs.Content>
  <Tabs.Content value="password"> {"Change your password here."->React.string} </Tabs.Content>
</Tabs>

Examples#

Line#

Use the variant=Line prop on TabsList for a line style.

Vertical#

Use orientation="vertical" for vertical tabs.

Disabled#

Icons#

API Reference#

See the Base UI Tabs documentation.

module LucideIcons = {
  type props = {className?: string, @as("data-icon") dataIcon?: string}
@react.component
let make = () =>
  <Tabs defaultValue="overview" className="w-[400px]">
@react.component
let make = () =>
  <Tabs defaultValue="overview">
@react.component
let make = () =>
  <Tabs defaultValue="account" orientation=Vertical>
@react.component
let make = () =>
  <Tabs defaultValue="home">