{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "x-icon", "type": "registry:ui", "title": "X Icon", "description": "X icon component.", "dependencies": [ "motion" ], "files": [ { "path": "registry/icons/x/index.tsx", "content": "'use client';\n\nimport * as React from 'react';\nimport { motion, type Variants } from 'motion/react';\n\nimport {\n getVariants,\n useAnimateIconContext,\n IconWrapper,\n type IconProps,\n} from '@/components/animate-ui/icons/icon';\n\ntype XProps = IconProps;\n\nconst animations = {\n default: {\n line1: {\n initial: {\n rotate: 0,\n transition: { ease: 'easeInOut', duration: 0.4 },\n },\n animate: {\n rotate: 90,\n transition: { ease: 'easeInOut', duration: 0.4 },\n },\n },\n line2: {\n initial: {\n rotate: 0,\n transition: { ease: 'easeInOut', duration: 0.4, delay: 0.1 },\n },\n animate: {\n rotate: 90,\n transition: { ease: 'easeInOut', duration: 0.4, delay: 0.1 },\n },\n },\n } satisfies Record,\n plus: {\n line1: {\n initial: {\n rotate: 0,\n x1: 6,\n y1: 18,\n x2: 18,\n y2: 6,\n transition: { ease: 'easeInOut', duration: 0.3, delay: 0.1 },\n },\n animate: {\n rotate: 45,\n x1: 7.1,\n y1: 16.9,\n x2: 16.9,\n y2: 7.1,\n transition: { ease: 'easeInOut', duration: 0.3, delay: 0.1 },\n },\n },\n line2: {\n initial: {\n rotate: 0,\n x1: 6,\n y1: 6,\n x2: 18,\n y2: 18,\n transition: { ease: 'easeInOut', duration: 0.3 },\n },\n animate: {\n rotate: 45,\n x1: 7.1,\n y1: 7.1,\n x2: 16.9,\n y2: 16.9,\n transition: { ease: 'easeInOut', duration: 0.3 },\n },\n },\n } satisfies Record,\n} as const;\n\nfunction IconComponent({ size, ...props }: XProps) {\n const { controls } = useAnimateIconContext();\n const variants = getVariants(animations);\n\n return (\n \n \n \n \n );\n}\n\nfunction X(props: XProps) {\n return ;\n}\n\nexport { animations, X, X as XIcon, type XProps, type XProps as XIconProps };\n", "type": "registry:ui", "target": "components/animate-ui/icons/x.tsx" } ], "meta": { "keywords": [ "cross", "x", "delete", "close", "cancel", "remove", "clear", "math", "multiply", "multiplication" ] } }