Chewypixel component
Tabs
Underline tabs. The underline slides to the active tab and resizes to fit its label.
Installation
npx shadcn@latest add https://chewypixel.io/r/tabs.jsonUsage
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
export function AccountTabs() {
return (
<Tabs defaultValue="profile">
<TabsList>
<TabsTrigger value="profile">Profile</TabsTrigger>
<TabsTrigger value="billing">Billing</TabsTrigger>
<TabsTrigger value="notifications">Notifications</TabsTrigger>
</TabsList>
<TabsContent value="profile">Your name, photo and bio.</TabsContent>
<TabsContent value="billing">Your plan and invoices.</TabsContent>
<TabsContent value="notifications">What we email you about.</TabsContent>
</Tabs>
);
}Props
valueThe active tab, when controlled.
string
defaultValueThe tab that starts active, when uncontrolled.
string
onValueChangeCalled with the new value when the active tab changes.
(value: string) => void
Released under the MIT License.
More components
- SwitchA switch whose thumb springs across when toggled and stretches while pressed.
- CheckboxA checkbox that draws its check mark and squishes when pressed.
- StatusA colored dot and a label for showing state, with an optional pulse.
- Animated NumberA number that counts to its new value when it changes.
See them in a real app
These components come from Mochi, our admin dashboard template built with Next.js, shadcn/ui and Motion.