Redpanda UI
RC
Redpanda UI

Tabs

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

Made by imskyleen
Loading component...

Variants

Card

Use the card variant for tabs with a bordered card container.

Loading component...

Contained

Use the contained variant for tabs with a muted background container.

Loading component...

Underline

Use the underline variant for tabs with a bottom border indicator.

Loading component...

Sizes

Small

Use size="sm" for compact tabs.

Loading component...

Large

Use size="lg" for larger tabs.

Loading component...

Layout

Equal Layout

Use layout="equal" with columns to create equal-width tabs.

Loading component...

Full Layout

Use layout="full" to make tabs span the full width.

Loading component...

Gap

Use the gap prop to control spacing between tabs.

Loading component...

Combinations

Card with Underline

Combine card variant with underline TabsList.

Loading component...

Contained with Equal Layout

Combine contained variant with equal layout.

Loading component...

When to use

Tabs organize content into separate panels. Use this decision tree:

Installation

Usage

<Tabs>
  <TabsList>
    <TabsTrigger value="tab1">Tab 1</TabsTrigger>
    <TabsTrigger value="tab2">Tab 2</TabsTrigger>
  </TabsList>
  <TabsContents>
    <TabsContent value="tab1">Tab 1 Content</TabsContent>
    <TabsContent value="tab2">Tab 2 Content</TabsContent>
  </TabsContents>
</Tabs>

Underline Variant

<Tabs>
  <TabsList variant="underline">
    <TabsTrigger variant="underline" value="tab1">Tab 1</TabsTrigger>
    <TabsTrigger variant="underline" value="tab2">Tab 2</TabsTrigger>
  </TabsList>
  <TabsContents>
    <TabsContent value="tab1">Tab 1 Content</TabsContent>
    <TabsContent value="tab2">Tab 2 Content</TabsContent>
  </TabsContents>
</Tabs>

Props

Animate UI Props

Tabs

Prop

Type

TabsList

Prop

Type

TabsTrigger

Prop

Type

TabsContent

Prop

Type

TabsContents

Prop

Type

Credits

Built by malinskibeniamin. The source code is available on GitHub.

On this page