Documentation

Installation

Set up your project once, then add the components you need.

Prerequisites

Use a React or Next.js project with TypeScript and Tailwind CSS v4. Knot UI assumes the @/ alias points to your source folder.

bun add clsx tailwind-merge motion

Initialize your project

Initialization creates the shared utilities, animation configuration, hover hook, and theme variables used by the components.

bunx knot-ui init

Existing helper files are preserved. Use --overwrite when you want to replace them.

Add a component

Choose a component from the documentation. The CLI copies the source into your components folder and installs its dependencies.

bunx knot-ui add buttonbunx knot-ui add codebunx knot-ui add tabs

Copy the source manually

Open the Manual installation view on a component page for its dependencies, shared helpers, and source files. Initialize the theme variables once before using the component.