CLI

How to set up Kõsori UI in your Next.js project.

Start CLI

Run the init ui command to setup your Next.js project.

npx @kosori/cli init ui

Configure kosori.config.json

You will be asked a few questions to configure kosori.config.json.

Write configuration to kosori.config.json? > no / yes
Write globals.css, tailwind.config.ts, layout.tsx and cn.ts files? > no / yes
Install the dependencies? > no / yes

That's it

You can now start adding components to you project.

npx @kosori/cli add components button

The command above will add the Button component to your project. You can them import it like this:

import { Button } from '~/components/ui/button';
 
const Home = () => {
  return (
    <div>
      <Button>Click me</Button>
    </div>
  );
};
 
export default Home;

On this page