52 Pro components and page blocks

Get Pro

Animated Tabs

New

Preview

Customize

Underline
Duration0.40s
Slide24px

Usage

import { AnimatedTabs } from "@/components/uibrik/animated-tabs/animated-tabs";

<AnimatedTabs tabs={tabs} />

Installation

npx shadcn@latest add https://uibrik.com/r/animated-tabs.json
Adds the files to components/uibrik/animated-tabs and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/animated-tabs.

Props

AnimatedTabs
variant
Type "underline" | "pill"
"underline"
A line under the selected tab, or a filled shape behind it.
hover
Type boolean
true
A highlight that follows the pointer across the tabs.
duration
Type number
0.4
How long the indicator and panels take to move.
slide
Type number
24
How far a panel slides on its way in or out. 0 cross-fades.
tabsrequired
Type { value; label; icon?; content; disabled? }[]
–
Tabs in order, each with the panel it shows.
value / onChange
Type string / (value) => void
–
Controlled selection.
defaultValue
Type string
–
Selected tab on mount when uncontrolled. Defaults to the first.
label
Type string
–
Names the tab list for screen readers.
className
Type string
–
Classes for the wrapper.
panelClassName
Type string
–
Classes for each panel.