18 lines
2.7 KiB
JSON
18 lines
2.7 KiB
JSON
{
|
|
"$schema": "https://ui.shadcn.com/schema/registry-item.json",
|
|
"name": "headless-tabs-demo",
|
|
"type": "registry:ui",
|
|
"title": "Headless Tabs Demo",
|
|
"description": "Demo showing an animated headless tabs.",
|
|
"registryDependencies": [
|
|
"https://animate-ui.com/r/headless-tabs"
|
|
],
|
|
"files": [
|
|
{
|
|
"path": "registry/demo/headless/tabs/index.tsx",
|
|
"content": "import { Button } from '@/components/ui/button';\nimport { Input } from '@/components/ui/input';\nimport { Label } from '@/components/ui/label';\nimport {\n Tab,\n TabGroup,\n TabList,\n TabPanel,\n TabPanels,\n} from '@/components/animate-ui/headless/tabs';\n\nexport const HeadlessTabsDemo = () => {\n return (\n <TabGroup defaultValue=\"account\" className=\"w-[400px] bg-muted rounded-lg\">\n <TabList className=\"grid w-full grid-cols-2\">\n <Tab index={0}>Account</Tab>\n <Tab index={1}>Password</Tab>\n </TabList>\n\n <TabPanels className=\"mx-1 mb-1 -mt-2 rounded-sm h-full bg-background\">\n <TabPanel className=\"space-y-6 p-6\">\n <p className=\"text-sm text-muted-foreground\">\n Make changes to your account here. Click save when you're done.\n </p>\n\n <div className=\"space-y-3\">\n <div className=\"space-y-1\">\n <Label htmlFor=\"name\">Name</Label>\n <Input id=\"name\" defaultValue=\"Pedro Duarte\" />\n </div>\n <div className=\"space-y-1\">\n <Label htmlFor=\"username\">Username</Label>\n <Input id=\"username\" defaultValue=\"@peduarte\" />\n </div>\n </div>\n\n <Button>Save changes</Button>\n </TabPanel>\n <TabPanel className=\"space-y-6 p-6\">\n <p className=\"text-sm text-muted-foreground\">\n Change your password here. After saving, you'll be logged out.\n </p>\n <div className=\"space-y-3\">\n <div className=\"space-y-1\">\n <Label htmlFor=\"current\">Current password</Label>\n <Input id=\"current\" type=\"password\" />\n </div>\n <div className=\"space-y-1\">\n <Label htmlFor=\"new\">New password</Label>\n <Input id=\"new\" type=\"password\" />\n </div>\n <div className=\"space-y-1\">\n <Label htmlFor=\"confirm\">Confirm password</Label>\n <Input id=\"confirm\" type=\"password\" />\n </div>\n </div>\n\n <Button>Save password</Button>\n </TabPanel>\n </TabPanels>\n </TabGroup>\n );\n};\n",
|
|
"type": "registry:ui",
|
|
"target": "components/animate-ui/demo/headless/tabs.tsx"
|
|
}
|
|
]
|
|
} |