ComponentsNew

Icon Tabs

A row of icons. The selected tab widens and slides its name out, the others stay compact.

Customize

accentColor
secondaryColor
glowColor

Based on Icon Tabs (MIT license) · Terms of use

More in Pro

View all

Props

9 properties
PropertyTypeDefaultDescription
tabs{ title: string; icon: ReactNode }[]—Tabs: title and icon.
defaultIndexnumber0Tab selected at first, counted from zero.
centerbooleanfalseCenter the row.
durationnumber0.35Expand duration in seconds.
onChange(index: number) => void—Called with the selected tab number.
accentColorstring"#ffffff"Main colour: icon and tint of the selected tab.
secondaryColorstring"#a3a3a3"Second colour: where the selected tab's tint fades to.
glowColorstring"rgba(255, 255, 255, 0.18)"Soft glow around the selected tab.
classNamestring—Extra classes.

Dependencies

3 required packages

npm install motion clsx tailwind-merge

Related components

View all