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 initnpx @human-kit/design inityarn dlx @human-kit/design initbunx @human-kit/design initThe command does these steps:
- It writes
human-kit.jsonat the root of the project. - It writes the
cn()helper tosrc/lib/utils.ts. - It adds the theme to
src/app.css. Use--cssfor a different file. - It installs
clsx,tailwind-mergeandtw-animate-css.
Add components
pnpm dlx @human-kit/design add button dialog selectnpx @human-kit/design add button dialog selectyarn dlx @human-kit/design add button dialog selectbunx @human-kit/design add button dialog selectThe 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"
}
}