DocumentationInstallation

Installation

Copy a Kida animation into your project, then customize the source as your own.

Svelte

Copy source, not a package.

Kida uses the shadcn CLI to place readable component files directly in your project. This is the only way to install Kida today, because the npm packages are not published. Copied files are yours to edit and do not update automatically.

Before you start

You need:

  • a React project;
  • Node.js and npm, pnpm, yarn, or Bun;
  • a shadcn components.json file.

Kida's registry installs public runtime dependencies automatically. You do not need@kida-ui/react, @kida-ui/motion, or any other unpublished Kida package.

Prepare your project

Start a new project

Start a new project:

npx shadcn@latest init --template vite --name my-app --no-monorepo

Choose a component library and preset when prompted, enter the generated directory, then continue with the installation command below.

Use an existing project

From the root of a shadcn-compatible React project, initialize its configuration once:

npx shadcn@latest init

If the CLI reports missing Tailwind configuration or an import alias, complete theshadcn framework setupbefore continuing.

Install a component

Each component page provides its own registry command. For example, install TextBloom:

npx shadcn@latest add https://kida-ui.onrender.com/r/text-bloom.json

The command:

  • downloads the component from Kida's public registry;
  • installs its public runtime dependencies;
  • writes the component, styles, and local motion helpers into your project.

When you add another Kida component, review any overwrite prompt before accepting it if you have already edited a shared helper.

Use the component

Import the copied source from your project's configured alias:

import { TextBloom } from '@/components/ui/kida/text-bloom'

export default function TextBloomExample() {
  return (
    <TextBloom as="h1" voice="pop">
      Make the headline bloom.
    </TextBloom>
  )
}

Start your development server and refresh the page to replay viewport-triggered animations. Component pages document the available props, variants, accessibility behavior, and live examples.

Understand the copied files

A TextBloom installation creates this structure by default:

src/components/ui/kida/
├── text-bloom.tsx
├── text-bloom.css
├── compose-refs.ts
├── use-isomorphic-layout-effect.ts
└── motion/
    ├── text-bloom.ts
    └── reduced-motion.ts

The kida directory namespaces Kida source inside the CLI's conventionalcomponents/ui directory. Keep the relative structure intact so internal imports continue to resolve.

Copy manually

If you do not want to use the shadcn CLI, open a component page and expandCopy manually. Install the listed dependencies, create every file at its shown target path, and preserve the directory structure.

Manual copying is useful when your project does not use shadcn, but the registry command is the safer default because it handles dependencies and configured aliases for you.

Troubleshooting

“A components.json file is required”

Run npx shadcn@latest init from your project root, then retry the Kida command.

Tailwind or import-alias validation fails

Finish your CLI's setup for the selected framework. Confirm that components.json points to the same alias your TypeScript and bundler configuration understand.

The import cannot be resolved

Check the path created by the CLI. With the default alias, TextBloom is imported from@/components/ui/kida/text-bloom. Do not import it from an unpublished@kida-ui/* package.

The component renders but does not animate

Refresh the page, make sure the element enters the viewport, and check whether your operating system requests reduced motion. Kida intentionally avoids non-essential motion whenprefers-reduced-motion: reduce is active.

The copy button fails

Allow clipboard access for the site, or select the command directly from the code block and copy it with your keyboard.

Verify your installation

  1. Confirm the expected files exist under src/components/ui/kida.
  2. Render the component and check the browser console for errors.
  3. Try its documented variants or options.
  4. Run your production build, such as pnpm build.

A successful production build confirms the copied source, imports, types, and runtime dependencies work together outside the Kida repository.