navigation/@mihcm/ui·v0.21.0·stable
Tabs
Controlled tabbed interface with full keyboard navigation. Composable: Tabs, TabsList, TabsTrigger, TabsContent.
Live preview
Adjust the controls on the right; the preview and code update in real time.
Manage your account settings and preferences.
example.tsxtsx
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@mihcm/ui/Tabs';
import { useState } from 'react';
export function Example() {
const [value, setValue] = useState('account');
return (
<Tabs value={value} onValueChange={setValue}>
<TabsList variant="default" layout="equal">
<TabsTrigger value="account">Account</TabsTrigger>
<TabsTrigger value="password">Password</TabsTrigger>
<TabsTrigger value="notifications">Notifications</TabsTrigger>
</TabsList>
<TabsContent value="account">Manage your account settings and preferences.</TabsContent>
<TabsContent value="password">Change your password and security settings.</TabsContent>
<TabsContent value="notifications">Configure notification preferences.</TabsContent>
</Tabs>
);
}Install
Both paths are valid. CLI ships the source into your repo (you own it). Install pins via npm.
npx @mihcm/cli add TabsCopies the source into
components/ds/Tabs.tsx. You own the file. Use --out to override the directory or --force to overwrite.