add new component @registry/new-york/scramble-in.tsx update docs and demo then run pnpm…
- User
add new component @registry/new-york/scramble-in.tsx update docs and demo then run pnpm fix
- Assistant
Done. Here's what was added:
- registry.json — Added
scramble-inentry with no external dependencies - demo/scramble-in-demo.tsx — Preview component showing the scramble-in effect
- content/docs/components/scramble-in.mdx — Full docs with installation, usage, props table, and handle API
- registry/new-york/scramble-in.tsx — Fixed lint error (
Array()→Array.from({ length: n }))
pnpm fixpasses clean. - registry.json — Added
- User
Error Type
Runtime Error
Error Message
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Check the render method of
MDXContent.codeat _createMdxContent (content/docs/components/scramble-in.mdx.js?collection=docs:220:21) at MDXContent (content/docs/components/scramble-in.mdx.js?collection=docs:806:8) at Page (app/(app)/docs/[[...slug]]/page.tsx:191:17)Code Frame
218 | children: [_jsx(ComponentPreview, { 219 | name: "scramble-in",
220 | children: _jsx(ScrambleInPreview, {}) | ^ 221 | }), "\n", _jsx(_components.h2, { 222 | id: "installation", 223 | children: "Installation"
Next.js version: 16.2.4 (Turbopack)
- Assistant
The demo uses a default export but the MDX imports it as a named export. Fixing:
- Assistant
Fixed. The demo was using
export defaultinstead of a named export. Also fixed lint issues (movedtitlesoutside component, replacedforEachwithforloop,index++→index += 1).pnpm fixpasses clean. - User
make it tasteful @demo/scramble-in-demo.tsx
- Assistant
Let me look at other demos for design
- Assistant
Let me also check how other demos handle typography and the docs references
- Assistant
Now I'll create a tasteful, refined demo. The current one is overly complex with dark background and stagger effects. A cleaner approach will better showcase the component
- Assistant
Wait, the IntersectionObserver approach is wrong - there's no
scramble-activeclass. Let me simplify to use the component's built-inautoStart. - Assistant
Now let me run pnpm fix to make sure everything passes
- Assistant
All clean. The demo is now minimal and refined — centered layout with clean typography, two showcase lines at different sizes, and no unnecessary complexity. The stagger delay between the two components naturally creates a visual cascade as the page loads.