Tabs

Tabs display different sections of content, with only one panel visible at once.

@radix-ui/react-tabs

lucide-react

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes.com/r/tabs.json

API Reference

Root

Root component that controls all the parts of a tabs.

PropTypeDefault
defaultValuestring-
valuestring-
onValueChangefunction-

List

A container that holds the trigger buttons.

PropTypeDefault
asChildbooleanfalse
loopbooleantrue

Trigger

The button that activates its associated content.

PropTypeDefault
asChildbooleanfalse
disabledbooleanfalse
Data attributeValues
[data-state]active, inactive
[data-disabled]Present when disabled

Content

The content that is shown when its associated trigger is active.

PropTypeDefault
asChildbooleanfalse
valuestring-
Data attributeValues
[data-state]active, inactive