Motion Tabs

PreviousNext

Animated segmented tabs with a fluid active pill, keyboard support, badges, and content transitions.

A compact summary of the current workspace signal.

MRR

$48.2k+12%

Accounts

1,284+8%

Health

96%+4%

Installation

pnpm dlx shadcn@latest add https://matos-ui.com/r/motion-tabs.json

Usage

import { MotionTabs } from "@/components/matos-ui/motion-tabs"
<MotionTabs
  items={[
    {
      value: "overview",
      label: "Overview",
      badge: "Live",
      content: <div>Overview content</div>,
    },
    {
      value: "billing",
      label: "Billing",
      content: <div>Billing content</div>,
    },
  ]}
/>

Reference

MotionTabs Props

PropTypeDefaultDescription
itemsMotionTabItem[]-Tabs and panel content.
valuestring?-Controlled selected value.
defaultValuestring?-Initial uncontrolled value.
onValueChange(value: string) => void-Called when a tab is selected.
size"sm" | "md" | "lg""md"Max width preset.
listClassNamestring?-Classes for the tab list.
panelClassNamestring?-Classes for the active panel.

MotionTabItem

FieldTypeDescription
valuestringUnique tab value.
labelReactNodeVisible tab label.
iconReactNodeOptional leading icon.
badgeReactNodeOptional compact badge.
descriptionReactNodeOptional panel description.
contentReactNodePanel content for the tab.
disabledbooleanDisables the tab.

Also exported: motionTabsVariants, MotionTabItem, and MotionTabsProps.