{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "slide-text-button", "title": "Slide Text Button", "description": "A button with sliding text and an expanding hover background.", "dependencies": [ "motion" ], "files": [ { "path": "registry/new-york/components/slide-text-button/slide-text-button.tsx", "type": "registry:component", "content": "\"use client\";\n\nimport React from \"react\";\nimport { motion } from \"motion/react\";\nimport { cn } from \"@/lib/utils\";\n\nconst circleVariants = {\n rest: { scale: 0, opacity: 0 },\n hover: { scale: 1, opacity: 1 },\n};\n\nconst circleTransition = {\n type: \"tween\" as const,\n duration: 0.25,\n ease: [0.22, 1, 0.36, 1] as const,\n};\n\nconst slideVariants = {\n rest: { y: \"0%\" },\n hover: { y: \"-50%\" },\n};\n\nconst slideTransition = {\n type: \"spring\" as const,\n stiffness: 250,\n damping: 22,\n};\n\nconst DefaultIcon = () => (\n \n \n \n);\n\nexport interface SlideTextButtonProps\n extends Omit, \"children\" | \"initial\" | \"whileHover\" | \"whileTap\" | \"variants\"> {\n initialText?: React.ReactNode;\n hoverText?: React.ReactNode;\n}\n\nexport default function SlideTextButton({\n initialText = ,\n hoverText = ,\n className,\n ...props\n}: SlideTextButtonProps) {\n return (\n \n \n\n
\n \n
\n {initialText}\n
\n
\n {hoverText}\n
\n \n
\n \n );\n}\n" } ], "type": "registry:component" }