Skip to the content
human-kit design
01 — Get started

Installation

Set up the kit in a SvelteKit project. The project must use Svelte 5 and Tailwind CSS v4.

Run init

pnpm dlx @human-kit/design init
npx @human-kit/design init
yarn dlx @human-kit/design init
bunx @human-kit/design init

The command does these steps:

  • It writes human-kit.json at the root of the project.
  • It writes the cn() helper to src/lib/utils.ts.
  • It adds the theme to src/app.css. Use --css for a different file.
  • It installs clsx, tailwind-merge and tw-animate-css.

Add components

pnpm dlx @human-kit/design add button dialog select
npx @human-kit/design add button dialog select
yarn dlx @human-kit/design add button dialog select
bunx @human-kit/design add button dialog select

The command copies the files of each component and of the components that it needs. It does not replace a file that you changed. Use --overwrite to replace it.

Use them

<script lang="ts">
	import * as Button from '$lib/components/ui/button';
</script>

<Button.Root variant="outline">Save</Button.Root>

Configuration

human-kit.json tells the CLI where to put the files. The two aliases must start with $lib. The CLI writes the import paths of the copied files with these aliases.

{
	"registry": "https://design.human-kit.com/r",
	"css": "src/app.css",
	"aliases": {
		"lib": "$lib",
		"ui": "$lib/components/ui"
	}
}