DocumentationInstallation

Installation

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

Copy source, not a package.

Kida uses the shadcn-svelte 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 Svelte 5 TypeScript (SvelteKit or Vite) project;
  • Node.js and npm, pnpm, yarn, or Bun;
  • a shadcn-svelte components.json file.

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

Prepare your project

Start a new project

Start a new project:

npx sv create my-app --template minimal --types ts --add tailwindcss

Enter the new project and install dependencies. shadcn-svelte requires Tailwind CSS in the project, so the command above adds it; Kida components do not depend on it.

Use an existing project

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

npx shadcn-svelte@1.8.0 init

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

Install a component

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

npx shadcn-svelte@1.8.0 add https://kida-ui.onrender.com/r/svelte/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:

<script lang="ts">
import TextBloom from '$lib/components/ui/kida/text-bloom.svelte'
</script>

<TextBloom text="Make the headline bloom." voice="pop" as="h1" />

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/lib/components/ui/kida/
├── text-bloom.svelte
├── text-bloom.types.ts
├── text-bloom.css
├── text-bloom.motion.ts
└── reduced-motion.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.

SvelteKit 3 projects import the same files through #lib instead of$lib, for example #lib/components/ui/kida/text-bloom.svelte. SvelteKit 2 and Vite projects use $lib, as in the examples on this site.

Copy manually

If you do not want to use the shadcn-svelte 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-svelte@1.8.0 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$lib/components/ui/kida/text-bloom.svelte. 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/lib/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.