{"name":"pop","entry":"component","title":"Pop","description":"Spring entrances for Remotion: Pop slides or scales one block in, Stagger cascades a list, and Leave fades a block out.","category":"Motion","capabilities":["replay","player"],"needsRemotion":true,"registryDependencies":["@jbm/motion-hooks"],"install":"npx shadcn@latest add @jbm/pop","installName":"pop","page":"https://jbm-ui.bns.studio/c/pop","registryItem":"https://jbm-ui.bns.studio/r/pop.json","sourcePath":"registry/jbm/motion/pop.tsx","files":[{"source":"registry/jbm/motion/pop.tsx","target":"src/jbm/motion/pop.tsx","import":"@/jbm/motion/pop","type":"registry:component"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/pop.md","json":"https://jbm-ui.bns.studio/catalog/pop.json"},"snippet":"import { Stagger } from \"@/jbm/motion/pop\"\nimport { Chip } from \"@/jbm/ui/chip\" // install @jbm/chip separately\n\n<Stagger at={0.2} step={0.35}>\n  {[\"Idea\", \"Datos\"].map(text => <Chip key={text}>{text}</Chip>)}\n</Stagger>","api":[{"export":"Pop","kind":"component","summary":"Wraps children in a div whose opacity follows a useIn spring from `at`, while it translates in from one side by `dist` or scales from 0.6 to 1.","props":[{"name":"at","type":"number","required":true,"default":null,"description":"Entrance start in seconds relative to the enclosing Sequence."},{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"Content to reveal."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged onto the wrapper (after opacity and transform, so a transform here replaces the motion)."},{"name":"from","type":"\"up\" | \"down\" | \"left\" | \"right\" | \"scale\"","required":false,"default":"\"up\"","description":"Entrance direction: `up` rises from below, `down` drops from above, `left`/`right` slide in from that side, `scale` grows from 0.6×."},{"name":"dist","type":"number","required":false,"default":"40","description":"Travel distance in stage pixels for the directional entrances; ignored by `scale`."}],"passthrough":[]},{"export":"Stagger","kind":"component","summary":"Wraps each child in a Pop; child i enters at `at + i × step` seconds.","props":[{"name":"at","type":"number","required":true,"default":null,"description":"Start of the first child, in seconds relative to the enclosing Sequence."},{"name":"step","type":"number","required":false,"default":"0.3","description":"Seconds between consecutive children."},{"name":"from","type":"\"up\" | \"down\" | \"left\" | \"right\" | \"scale\"","required":false,"default":"\"up\"","description":"Entrance direction applied to every child (see Pop)."},{"name":"dist","type":"number","required":false,"default":"14","description":"Travel distance in stage pixels for every child."},{"name":"children","type":"React.ReactNode[]","required":true,"default":null,"description":"Array of children to cascade; each becomes its own Pop wrapper."}],"passthrough":[]},{"export":"Leave","kind":"component","summary":"Exit: from `at`, the wrapper fades out with cubic-out easing and drifts up by `dist` over 0.4 s, keeping its layout space.","props":[{"name":"at","type":"number","required":true,"default":null,"description":"Exit start in seconds relative to the enclosing Sequence."},{"name":"children","type":"React.ReactNode","required":true,"default":null,"description":"Content that leaves."},{"name":"style","type":"React.CSSProperties","required":false,"default":null,"description":"Inline styles merged onto the wrapper (after opacity and transform)."},{"name":"dist","type":"number","required":false,"default":"30","description":"Upward drift in stage pixels at the end of the exit."}],"passthrough":[]}],"stage":{"mode":"fluid","reason":"Each wrapper is a plain block div sized by its children; Pop, Stagger, and Leave add no box of their own. Translations and scale do not change layout size, so reserve room for `dist` travel near the safe-area edge."},"examples":[{"title":"Cascade chips","code":"import { Stagger } from \"@/jbm/motion/pop\"\nimport { Chip } from \"@/jbm/ui/chip\" // install @jbm/chip separately\n\n<Stagger at={0.2} step={0.35}>\n  {[\"Idea\", \"Datos\"].map(text => <Chip key={text}>{text}</Chip>)}\n</Stagger>"},{"title":"Enter, then leave before the scene ends","code":"import { Pop, Leave } from \"@/jbm/motion/pop\"\n\n<Leave at={3}>\n  <Pop at={0.4} from=\"left\" dist={60}>\n    <h2>Primero esto.</h2>\n  </Pop>\n</Leave>\n// Render inside a Remotion <Composition> or <Player>."}],"qa":["Step through the first frame (children invisible), mid-cascade (earlier children settled, later ones entering), and the last frame (all fully opaque at rest).","Try each `from` value: directional entrances move by `dist` and settle at 0 offset; `scale` grows without translating.","Check the spring overshoot does not push content past the safe area, especially with large `dist` values in vertical.","For Leave, confirm the block is fully transparent 0.4 s after `at` and its layout space remains."],"related":[{"name":"motion-hooks","relation":"installs"},{"name":"prob-bar","relation":"installed-by"},{"name":"rebuild-screens","relation":"installed-by"},{"name":"catalog","relation":"installed-by"},{"name":"propagate","relation":"installed-by"},{"name":"shelf","relation":"installed-by"},{"name":"scene-spec","relation":"installed-by"},{"name":"chip","relation":"example-import"}],"galleryPreview":{"about":"Cue times are seconds on the gallery preview's timeline, which renders the demo below; the Usage examples may use other timings. Map a cue to your own props by its place in the demo.","fps":30,"durationInFrames":46,"lastFrame":45,"strip":"https://jbm-ui.bns.studio/c/pop?view=strip","frames":[{"label":"Empty stage","frame":0,"at":0},{"label":"First chip lands","frame":15,"at":0.5,"note":"“Idea” has scaled in; “Datos” is just starting."},{"label":"Second chip lands","frame":27,"at":0.9,"note":"“Datos” is nearly settled and “Historia” starts to scale in."},{"label":"End","frame":45,"at":1.5}],"demo":[{"component":"Stagger","props":{"at":0.2,"step":0.35,"from":"scale"},"children":[{"component":"Chip","children":"Idea"},{"component":"Chip","children":"Datos"},{"component":"Chip","children":"Historia"}]}],"code":"<Stagger at={0.2} step={0.35} from=\"scale\">\n  <Chip>Idea</Chip>\n  <Chip>Datos</Chip>\n  <Chip>Historia</Chip>\n</Stagger>"},"setup":{"namespace":"@jbm","componentsJson":{"registries":{"@jbm":"https://jbm-ui.bns.studio/r/{name}.json"}},"command":"npx shadcn@latest add @jbm/<name>","target":"src/jbm/","importAlias":"@/jbm/…","tsconfigPaths":{"@/*":["./src/*"]}},"rules":["Install through the @jbm namespace: each registry item JSON (/r/<name>.json) carries its files' contents and each guide is served at /docs/<slug>.md, so agents never need the source repository (it is public on GitHub for people browsing the code).","Files install to src/jbm/ and import as @/jbm/…, which needs the @/* → ./src/* path alias in tsconfig.json.","Items marked needsRemotion require the remotion package and must render inside a Remotion composition or Player; every other item works in any React page.","Use one vermilion accent per composition; accent2 is for annotations only and soft is for dark surfaces only.","Stages are 1920×1080 landscape and 1080×1920 vertical with declared safe areas; each item's stage field declares its size in stage pixels, and scenes compose from YAML-shaped specs with @jbm/scene-spec."],"links":{"catalog":"https://jbm-ui.bns.studio/catalog.json","llms":"https://jbm-ui.bns.studio/llms.txt"}}