Skip to content
aq-ui
Back to ComponentsComponent

Tabs

Open-code aq-ui accessible component family for Tabs.

Preview

This is a live example. Interact with the available controls and use the keyboard to inspect the component's states and behavior.

Loading interactive preview…

Installation

pnpm dlx aq-ui@alpha add tabs

API reference

Client module

Import the parts you need, then jump to an export for its contract.

View full source

Quick start

"use client"

import { Tabs } from "@/components/ui/tabs"

<Tabs />

Tabs

constSource L10

Open-code aq-ui accessible component family for Tabs.

const Tabs = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.Root>, TabsPrimitive.Root.Props>(…)
Props type
TabsPrimitive.Root.Props
<Tabs />

TabsContent

constSource L81

Content export for composing Tabs.

const TabsContent = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.Panel>, TabsPrimitive.Panel.Props>(…)
Props type
TabsPrimitive.Panel.Props
<TabsContent />

TabsList

constSource L44

Public const export from Tabs.

const TabsList = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.List>, TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>>(…)
Props type
TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>
<TabsList />

tabsListVariants

constSource L29

Public const export from Tabs.

const tabsListVariants = cva(…)

TabsTrigger

constSource L60

Trigger export for composing Tabs.

const TabsTrigger = React.forwardRef<React.ComponentRef<typeof TabsPrimitive.Tab>, TabsPrimitive.Tab.Props>(…)
Props type
TabsPrimitive.Tab.Props
<TabsTrigger />

Registry dependencies

utils

Package dependencies

@base-ui/react@^1.7.0, class-variance-authority@^0.7.1

Files

  • components/ui/tabs.tsx

Source