Navigation & disclosure@neumorphism-ui/tabs

Tabs

Built on Base UI Tabs with the active trigger rendered as a raised surface and the list as an inset track. Supports controlled and uncontrolled values, automatic or manual activation, and horizontal or vertical orientation.

@neumorphism-ui/tabs
Registry JSON

Preview

Portfolio value₩18,420,000+6.8% this month

Installation

Installation: tabsnpx shadcn@latest add @neumorphism-ui/tabs

The CLI resolves npm dependencies, base tokens, utilities, and component source in order.

New to this Registry? Set up the namespace before continuing.

Usage

Import

Tabs import code
import {
  Tabs,
  TabsContent,
  TabsList,
  TabsTrigger,
} from "@/components/ui/tabs"

Example

Tabs usage code
<Tabs defaultValue="surface">
  <TabsList aria-label="Design tokens">
    <TabsTrigger value="surface">Surface</TabsTrigger>
    <TabsTrigger value="motion">Motion</TabsTrigger>
    <TabsTrigger value="access">Access</TabsTrigger>
  </TabsList>
  <TabsContent value="surface">Raised and inset surface tokens.</TabsContent>
  <TabsContent value="motion">Short, consistent transition tokens.</TabsContent>
  <TabsContent value="access">Focus and contrast tokens.</TabsContent>
</Tabs>

API Reference

ComponentPropTypeDefaultDescription
Tabsvalue / defaultValuestring—The controlled active tab value or initial uncontrolled value.
TabsonValueChange(value: string) => void—Called when the active tab changes.
Tabsorientation"horizontal" | "vertical""horizontal"Sets the list orientation and Arrow key navigation axis.
TabsListactivateOnFocusbooleanfalseDetermines whether moving focus with Arrow keys also activates the panel.
TabsTriggervaluerequiredstring—A unique value shared with the associated TabsContent.
TabsContentvaluerequiredstring—The trigger value that opens the panel.

Accessibility

  • 01

    Name the tab group on TabsList with aria-label or aria-labelledby.

  • 02

    Base UI manages tab, tablist, and tabpanel roles and the aria-controls and aria-selected relationships.

  • 03

    Use activateOnFocus on TabsList only when panel switching is immediate.