{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"review-cards-quote","type":"registry:component","title":"Review cards · Standout quote","description":"Single verified review with popping stars, a body that springs open with Read more, and a helpful toggle.","author":"GetUrUI <hello@geturui.dev>","dependencies":["motion","lucide-react"],"registryDependencies":[],"files":[{"path":"registry/geturui/examples/review-cards/quote.tsx","type":"registry:component","target":"components/examples/review-cards/quote.tsx","content":"\"use client\";\n\nimport * as React from \"react\";\nimport { AnimatePresence, motion, useReducedMotion } from \"motion/react\";\nimport { BadgeCheck, ChevronDown, Star, ThumbsUp } from \"lucide-react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface ReviewQuoteCardProps {\n  author?: string;\n  /** Role or context, e.g. \"Bought in Sage, size M\". */\n  meta?: string;\n  /** Initials used for the avatar. */\n  initials?: string;\n  rating?: number;\n  headline?: string;\n  /** Full review text; paragraphs separated by blank lines. */\n  body?: string;\n  /** Formatted date, e.g. \"Sep 14, 2026\". */\n  date?: string;\n  verified?: boolean;\n  helpful?: number;\n  /** Characters shown before \"Read more\". */\n  previewLength?: number;\n  onHelpfulChange?: (helpful: boolean) => void;\n  className?: string;\n}\n\nconst focus = \"outline-none focus-visible:shadow-[var(--focus-ring)]\";\n\n/** A single standout review: verified badge, star line, and a body that springs open in place with \"Read more\". */\nexport function ReviewQuoteCard({\n  author = \"Noor Halabi\",\n  meta = \"Product designer · Owned for 4 months\",\n  initials = \"NH\",\n  rating = 5,\n  headline = \"The first standing desk that disappears into the room\",\n  body = \"I was worried the motor would be loud on calls, but it is quieter than my laptop fan. The presets took a minute to learn and now I switch heights three or four times a day without thinking about it.\\n\\nCable tray is generous enough for a dock, two chargers and a power strip. The only thing I would change is the finish on the crossbar, which shows fingerprints. Still an easy five stars.\",\n  date = \"Sep 14, 2026\",\n  verified = true,\n  helpful = 38,\n  previewLength = 180,\n  onHelpfulChange,\n  className,\n}: ReviewQuoteCardProps) {\n  const reduce = useReducedMotion() ?? false;\n  const [open, setOpen] = React.useState(false);\n  const [voted, setVoted] = React.useState(false);\n  const bodyId = React.useId();\n  const long = body.length > previewLength;\n  const preview = long ? body.slice(0, previewLength).replace(/\\s+\\S*$/, \"\") + \"…\" : body;\n\n  function vote() {\n    const next = !voted;\n    setVoted(next);\n    onHelpfulChange?.(next);\n  }\n\n  return (\n    <figure className={cn(\"relative w-full max-w-[440px] overflow-hidden rounded-xl border border-border bg-surface-raised p-6 shadow-sm\", className)}>\n      <svg aria-hidden viewBox=\"0 0 48 36\" className=\"absolute right-5 top-5 h-9 w-12 text-ink/[0.06]\">\n        <path fill=\"currentColor\" d=\"M0 36V20C0 8 7 1 19 0l2 5c-7 2-10 6-10 12h9v19H0Zm27 0V20C27 8 34 1 46 0l2 5c-7 2-10 6-10 12h9v19H27Z\" />\n      </svg>\n\n      <div className=\"flex items-center gap-1\" role=\"img\" aria-label={`Rated ${rating} out of 5`}>\n        {Array.from({ length: 5 }, (_, i) => (\n          <motion.span\n            key={i}\n            initial={reduce ? false : { opacity: 0, scale: 0.4 }}\n            animate={{ opacity: 1, scale: 1 }}\n            transition={{ type: \"spring\", stiffness: 480, damping: 18, delay: reduce ? 0 : 0.05 * i }}\n          >\n            <Star aria-hidden className={cn(\"size-4\", i < rating ? \"text-volt-ink\" : \"text-ink-subtle/40\")} fill=\"currentColor\" strokeWidth={0} />\n          </motion.span>\n        ))}\n      </div>\n\n      <blockquote className=\"mt-3\">\n        <p className=\"font-display text-lg font-semibold leading-snug tracking-[-0.3px] text-ink\">{headline}</p>\n        <motion.div\n          id={bodyId}\n          layout={!reduce}\n          transition={{ type: \"spring\", stiffness: 300, damping: 32 }}\n          className=\"mt-2 overflow-hidden text-[14px] leading-relaxed text-ink-muted\"\n        >\n          <AnimatePresence mode=\"popLayout\" initial={false}>\n            <motion.div\n              key={open ? \"full\" : \"preview\"}\n              initial={{ opacity: 0, filter: \"blur(8px)\" }}\n              animate={{ opacity: 1, filter: \"blur(0px)\" }}\n              exit={{ opacity: 0, filter: \"blur(8px)\" }}\n              transition={{ duration: 0.25 }}\n              className=\"space-y-3\"\n            >\n              {(open ? body : preview).split(/\\n\\n+/).map((p, i) => (\n                <p key={i}>{p}</p>\n              ))}\n            </motion.div>\n          </AnimatePresence>\n        </motion.div>\n        {long && (\n          <button\n            type=\"button\"\n            aria-expanded={open}\n            aria-controls={bodyId}\n            onClick={() => setOpen((o) => !o)}\n            className={cn(\"mt-2 inline-flex items-center gap-1 rounded-xs text-[13px] font-medium text-ink underline-offset-4 hover:underline\", focus)}\n          >\n            {open ? \"Show less\" : \"Read more\"}\n            <ChevronDown aria-hidden className={cn(\"size-3.5 transition-transform duration-300 ease-spring\", open && \"rotate-180\")} />\n          </button>\n        )}\n      </blockquote>\n\n      <figcaption className=\"mt-5 flex flex-wrap items-center justify-between gap-3 border-t border-border pt-4\">\n        <div className=\"flex min-w-0 items-center gap-3\">\n          <span aria-hidden className=\"grid size-10 shrink-0 place-items-center rounded-full bg-surface-sunken font-mono text-xs font-semibold text-ink\">\n            {initials}\n          </span>\n          <div className=\"min-w-0\">\n            <p className=\"flex items-center gap-1.5 text-sm font-semibold text-ink\">\n              {author}\n              {verified && (\n                <span className=\"inline-flex items-center gap-1 text-[11px] font-medium text-success\">\n                  <BadgeCheck aria-hidden className=\"size-3.5\" />\n                  Verified buyer\n                </span>\n              )}\n            </p>\n            <p className=\"truncate text-xs text-ink-subtle\">\n              {meta} · {date}\n            </p>\n          </div>\n        </div>\n        <motion.button\n          type=\"button\"\n          aria-pressed={voted}\n          whileTap={reduce ? undefined : { scale: 0.94 }}\n          onClick={vote}\n          className={cn(\n            \"inline-flex h-8 items-center gap-1.5 rounded-full border px-3 text-xs font-medium transition-colors\",\n            voted ? \"border-transparent bg-volt-soft text-volt-ink\" : \"border-border-strong/40 text-ink-muted hover:text-ink\",\n            focus,\n          )}\n        >\n          <motion.span key={voted ? \"on\" : \"off\"} initial={reduce || !voted ? false : { rotate: -24, scale: 1.3 }} animate={{ rotate: 0, scale: 1 }} transition={{ type: \"spring\", stiffness: 500, damping: 14 }}>\n            <ThumbsUp aria-hidden className=\"size-3.5\" fill={voted ? \"currentColor\" : \"none\"} />\n          </motion.span>\n          Helpful\n          <span className=\"tabular-nums\">{helpful + (voted ? 1 : 0)}</span>\n        </motion.button>\n      </figcaption>\n    </figure>\n  );\n}\n"},{"path":"LICENSE-geturui.md","type":"registry:file","target":"LICENSE-geturui.md","content":"MIT License\n\nCopyright (c) 2026 geturui.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"}],"categories":["examples","reviews","rating","stars","testimonial","ecommerce","feedback","histogram","card"],"meta":{"tier":"free","license":"MIT","docs":"https://geturui.com/docs/review-cards#quote"}}