{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"side-folder","type":"registry:block","title":"Side Folder","description":"Glassy blue folder on its side, documents sliding out to the right as the pocket swings open on hover","dependencies":[],"files":[{"path":"illustrations/side-folder/side-folder.tsx","type":"registry:block","content":"\"use client\";\n\nimport { useId } from \"react\";\n\n/*\n * Side Folder – a glassy folder turned on its side, in a single self-contained file.\n * Three documents peek out to the right from behind a frosted front pocket with a tab on its edge.\n * Hover the folder: the pocket swings forward and every document slides out on its own.\n * The artwork scales with its container and keeps a 3 : 2 frame.\n */\n\nexport type SideFolderProps = {\n  className?: string;\n  /** Accessible description of the scene */\n  label?: string;\n};\n\n/* Front pocket on a 380 × 520 grid: a narrow top part and a wider tab towards the bottom */\nconst FRONT =\n  \"M40 0H290Q330 0 330 40V318Q330 338 344 348L364 362Q380 372 380 396V480Q380 520 340 520H40Q0 520 0 480V40Q0 0 40 0Z\";\nconst LINES = [78, 180, 140, 175, 126, 168, 110];\n/* A mask (unlike clip-path: url()) also cuts the frosted blur to the pocket shape, and scales with the box */\nconst MASK = `url(\"data:image/svg+xml,${encodeURIComponent(\n  `<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 380 520' preserveAspectRatio='none'><path d='${FRONT}'/></svg>`,\n)}\") 0 0 / 100% 100% no-repeat`;\n\nexport function SideFolder({\n  className,\n  label = \"Blue folder on its side, with three documents peeking out behind a frosted front pocket\",\n}: SideFolderProps) {\n  const id = \"ui-sf\" + useId().replace(/[^a-zA-Z0-9_-]/g, \"\");\n\n  return (\n    <div className={[\"ui-sf\", className].filter(Boolean).join(\" \")} role=\"img\" aria-label={label}>\n      {/* React 19 hoists this into <head> once, no matter how many instances render */}\n      <style href=\"ui-side-folder\" precedence=\"default\">\n        {css}\n      </style>\n      <div className=\"ui-sf-icon\" aria-hidden=\"true\">\n        {/* Back of the folder */}\n        <svg className=\"ui-sf-layer ui-sf-back\" viewBox=\"0 0 440 520\">\n          <defs>\n            <filter id={`${id}-hl`} x=\"-10%\" y=\"-10%\" width=\"120%\" height=\"120%\">\n              <feGaussianBlur in=\"SourceAlpha\" stdDeviation=\"4\" result=\"blur\" />\n              <feOffset in=\"blur\" dy=\"3\" result=\"offset\" />\n              <feComposite in=\"blur\" in2=\"offset\" operator=\"arithmetic\" k2=\"1\" k3=\"-1\" result=\"diff\" />\n              <feFlood floodColor=\"#fff\" floodOpacity=\"0.65\" />\n              <feComposite in2=\"diff\" operator=\"in\" result=\"light\" />\n              <feComposite in=\"light\" in2=\"SourceAlpha\" operator=\"in\" />\n            </filter>\n          </defs>\n          <rect x=\"0\" y=\"18\" width=\"440\" height=\"486\" rx=\"36\" fill=\"#5bb7ea\" />\n          <rect x=\"0\" y=\"18\" width=\"440\" height=\"486\" rx=\"36\" fill=\"#000\" filter={`url(#${id}-hl)`} />\n        </svg>\n\n        {/* Documents – each one slides out on its own */}\n        <svg className=\"ui-sf-layer\" viewBox=\"0 0 440 520\">\n          <defs>\n            <linearGradient id={`${id}-paper`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n              <stop offset=\"0%\" stopColor=\"#fff\" />\n              <stop offset=\"100%\" stopColor=\"#eaf2f8\" />\n            </linearGradient>\n            <symbol id={`${id}-doc`} overflow=\"visible\">\n              <rect x=\"0.6\" y=\"0.6\" width=\"278.8\" height=\"348.8\" rx=\"19.4\" fill={`url(#${id}-paper)`} stroke=\"rgba(0,0,0,0.12)\" strokeWidth=\"1.2\" />\n              {LINES.map((w, i) => (\n                <rect key={i} x=\"30\" y={87 + i * 28} width={w} height=\"9\" rx=\"4.5\" fill=\"rgba(0,0,0,0.12)\" />\n              ))}\n            </symbol>\n          </defs>\n          <g transform=\"scale(1.15)\">\n            <use className=\"ui-sf-doc ui-sf-doc--top\" href={`#${id}-doc`} />\n            <use className=\"ui-sf-doc ui-sf-doc--bottom\" href={`#${id}-doc`} />\n            <use className=\"ui-sf-doc ui-sf-doc--middle\" href={`#${id}-doc`} />\n          </g>\n        </svg>\n\n        {/* Frosted front pocket */}\n        <div className=\"ui-sf-front\">\n          <svg viewBox=\"0 0 380 520\">\n            <path d={FRONT} fill=\"none\" stroke=\"rgba(255,255,255,0.3)\" strokeWidth=\"4\" />\n          </svg>\n        </div>\n      </div>\n    </div>\n  );\n}\n\n/* ---------- Styles ---------- */\n\nconst css = /* css */ `\n.ui-sf {\n  --ui-sf-ease: cubic-bezier(0.2, 0.85, 0.25, 1);\n  position: relative;\n  width: 100%;\n  aspect-ratio: 3 / 2;\n  overflow: hidden;\n  container-type: inline-size;\n}\n\n/* The folder is drawn on a 440 × 520 grid; cqw keeps every detail in proportion */\n.ui-sf-icon {\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  width: 37%;\n  aspect-ratio: 440 / 520;\n  container-type: inline-size;\n  perspective: 260cqw;\n  perspective-origin: 40% 50%;\n  transform: translate(-50%, -50%);\n  transition: transform 0.6s var(--ui-sf-ease);\n}\n.ui-sf-icon:hover { transform: translate(-50%, -50%) scale(1.03); }\n\n.ui-sf-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }\n.ui-sf-back {\n  filter:\n    drop-shadow(0 5.4cqw 6.4cqw rgba(60, 130, 180, 0.28))\n    drop-shadow(0 1.8cqw 2.7cqw rgba(60, 130, 180, 0.16))\n    drop-shadow(0 0.45cqw 0.9cqw rgba(60, 130, 180, 0.1));\n}\n\n/* Documents, in the 1.15 scaled space of the stack */\n.ui-sf-doc {\n  transform-box: fill-box;\n  transform-origin: center;\n  filter: drop-shadow(0 3px 4px rgba(0, 30, 60, 0.18));\n  transition: transform 0.55s var(--ui-sf-ease);\n}\n.ui-sf-doc--top    { transform: translate(83px, 43px) rotate(3deg); }\n.ui-sf-doc--bottom { transform: translate(78px, 68px) rotate(4deg); }\n.ui-sf-doc--middle { transform: translate(73px, 56px) rotate(-2deg); }\n.ui-sf-icon:hover .ui-sf-doc--top    { transform: translate(100px, 35px) rotate(6deg); }\n.ui-sf-icon:hover .ui-sf-doc--bottom { transform: translate(93px, 75px) rotate(7deg); }\n.ui-sf-icon:hover .ui-sf-doc--middle { transform: translate(95px, 54px) rotate(0deg); }\n\n/* Pocket: hinged on its left edge, it swings its right edge towards you on hover */\n.ui-sf-front {\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 86.3636%;\n  height: 100%;\n  -webkit-mask: ${MASK};\n  mask: ${MASK};\n  background:\n    linear-gradient(180deg, rgba(0, 40, 75, 0) 76%, rgba(0, 40, 75, 0.26) 100%),\n    linear-gradient(160deg, rgba(132, 214, 248, 0.45) 0%, rgba(69, 170, 220, 0.45) 100%);\n  -webkit-backdrop-filter: blur(4.5cqw) saturate(1.1);\n  backdrop-filter: blur(4.5cqw) saturate(1.1);\n  transform-origin: 0 50%;\n  transition: transform 0.6s var(--ui-sf-ease);\n}\n.ui-sf-front svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }\n.ui-sf-icon:hover .ui-sf-front { transform: translateZ(3cqw) rotateY(-12deg); }\n\n@media (prefers-reduced-motion: reduce) {\n  .ui-sf-icon, .ui-sf-doc, .ui-sf-front { transition: none; }\n}\n`;\n"}]}