For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
/
144
Sponsor

Tabs

A tabs widget with sliding indicator and panel crossfade.

AccountPasswordSettings
Make changes to your account here.
Change your password here.
Manage your notification settings.
Customize

Installation

$ pnpm dlx shadcn@latest add @framecn/tabs

Usage

import { Tabs } from "@/components/ui/tabs";
<Tabs state="Account" variant="pill" />

Smooth transitions

The docs preview cycles Account → Password → Settings via useTabsTransition. Forward variant into the hook when using style so the indicator layout matches the variant prop:

import { Tabs } from "@/components/framecn/tabs";
import { useTabsTransition } from "@/components/framecn/use-tabs-transition";
 
const style = useTabsTransition(
  [
    { at: 18, state: "Account", duration: 16 },
    { at: 58, state: "Password", duration: 18 },
    { at: 94, state: "Settings", duration: 12 },
  ],
  { variant: "pill" }
);
 
<Tabs style={style} variant="pill" />;

style takes precedence over state when both are provided.

API Reference

Tabs

PropTypeDefault
statestring"Account"
styleTabsStyle- (takes precedence over state)
itemsstring[]["Account", "Password", "Settings"]
contentsstring[]Default panel copy for each tab
contentHeightnumber-
variant"pill" | "underline""pill"
themePartial<FramecnTheme>-
classNamestring-