Contributing an effect
This guide is for maintainers and invited contributors of the znverse repository, where every effect lives as a folder and every change is a pull request. To suggest an effect without repository access, get in touch through the About page.
1. Scaffold the folder
pnpm effect:create glow-cardThis creates registry/effects/glow-card/ with a manifest, a readme, a component in src/ and a demo in preview/.
2. Write the effect
| Path | Contents |
|---|---|
effect.json | Name, description, category, tags, framework, rendering, dependencies and more. See the Manifest reference |
src/ | The source people copy or install. Keep it self-contained: imports outside the folder make it copy-only |
preview/page.tsx | The demo, rendered by the preview app. HTML effects with src/index.html need no preview page |
README.md | Usage, props and notes. It becomes the effect's docs |
thumbnail.* | Optional for free effects; pnpm effect:thumbnails can capture one |
Guidelines:
- Respect
prefers-reduced-motionand set"reducedMotion": truewhen you do. - Prefer no dependencies. If you need one, add it to
apps/previewso the demo can bundle it. - Keep text and images in the effect your own; do not hotlink images from other sites.
3. Add a playground (optional)
Declare playground in the manifest, export the component by name, and read props in the demo:
"use client";
import type { ComponentProps } from "react";
import { usePlaygroundProps } from "../../../shared/playground";
import { GlowCard } from "../src/GlowCard";
export default function GlowCardPreview() {
const props = usePlaygroundProps<ComponentProps<typeof GlowCard>>();
return <GlowCard {...props} />;
}4. Validate
pnpm effect:validateThe validator checks the manifest, the folder name, the readme, the preview entry, the source files, thumbnails, dependencies, the playground and every kit. It also regenerates the preview map, which must be committed.
Kits
A kit is a JSON file in registry/kits/:
{
"slug": "landing-page",
"name": "Landing page kit",
"description": "Sections for a product landing page.",
"effects": ["hello-intro", "spotlight-card", "magnetic-button"]
}The file name must equal the slug, and every effect must exist. List effects in the order they should appear.
5. Open a pull request
Run the checks from the repository readme (typecheck, lint, tests and the smoke suite) and open a pull request. Reviews look at the effect itself, accessibility, dependencies and whether the docs explain how to use it.