{ "name": "smooth-drawer", "type": "registry:component", "dependencies": [ "motion" ], "registryDependencies": [ "drawer", "button" ], "files": [ { "type": "registry:component", "content": "\"use client\";\n\n/**\n * @author: @dorianbaffier\n * @description: Smooth Drawer\n * @version: 1.0.0\n * @date: 2025-06-26\n * @license: MIT\n * @website: https://kokonutui.com\n * @github: https://github.com/kokonut-labs/kokonutui\n */\n\nimport { Fingerprint } from \"lucide-react\";\nimport { motion } from \"motion/react\";\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport type * as React from \"react\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerTitle,\n DrawerTrigger,\n} from \"@/components/ui/drawer\";\n\ninterface PriceTagProps {\n price: number;\n discountedPrice: number;\n}\n\nfunction PriceTag({ price, discountedPrice }: PriceTagProps) {\n return (\n
\n
\n \n ${discountedPrice}\n \n \n ${price}\n \n
\n
\n \n Lifetime access\n \n \n One-time payment\n \n
\n
\n );\n}\n\ninterface DrawerDemoProps extends React.HTMLAttributes {\n title?: string;\n description?: string;\n primaryButtonText?: string;\n secondaryButtonText?: string;\n onPrimaryAction?: () => void;\n onSecondaryAction?: () => void;\n price?: number;\n discountedPrice?: number;\n}\n\nconst drawerVariants = {\n hidden: {\n y: \"100%\",\n opacity: 0,\n rotateX: 5,\n transition: {\n type: \"spring\",\n stiffness: 300,\n damping: 30,\n },\n },\n visible: {\n y: 0,\n opacity: 1,\n rotateX: 0,\n transition: {\n type: \"spring\",\n stiffness: 300,\n damping: 30,\n mass: 0.8,\n staggerChildren: 0.07,\n delayChildren: 0.2,\n },\n },\n};\n\nconst itemVariants = {\n hidden: {\n y: 20,\n opacity: 0,\n transition: {\n type: \"spring\",\n stiffness: 300,\n damping: 30,\n },\n },\n visible: {\n y: 0,\n opacity: 1,\n transition: {\n type: \"spring\",\n stiffness: 300,\n damping: 30,\n mass: 0.8,\n },\n },\n};\n\nexport default function SmoothDrawer({\n title = \"KokonutUI - Pro\",\n description = \"100+ collection of UI Components and templates built for React, Next.js, and Tailwind CSS. Spend no time on design and focus on shipping.\",\n primaryButtonText = \"Buy Now\",\n secondaryButtonText = \"Maybe Later\",\n onSecondaryAction,\n price = 169,\n discountedPrice = 99,\n}: DrawerDemoProps) {\n const handleSecondaryClick = () => {\n onSecondaryAction?.();\n };\n\n return (\n \n \n \n \n \n \n \n \n \n \n
\n \"Logo\"\n
\n
\n \n {title}\n \n
\n \n \n {description}\n \n \n
\n
\n\n \n \n \n\n \n \n
\n \n \n \n {primaryButtonText}\n \n \n \n \n \n
\n \n \n {secondaryButtonText}\n \n \n
\n
\n \n
\n
\n );\n}\n", "path": "/components/kokonutui/smooth-drawer.tsx", "target": "components/kokonutui/smooth-drawer.tsx" } ] }