Install Selia with Vite

Setting up Selia in Vite project.

Create Project

Run the following command to create a new Vite project and choose React + TypeScript template:

Tailwind CSS

Install Tailwind CSS:

Delete all content in src/index.css and add the following:

src/index.css

Edit tsconfig.json

Add the baseUrl compiler option to your tsconfig.json file:

tsconfig.json

Edit tsconfig.app.json

Add the baseUrl compiler option to your tsconfig.app.json file:

tsconfig.app.json

Edit vite.config.ts

Add the following configuration to resolve alias in vite.config.ts and add Tailwind CSS plugin:

vite.config.ts

Selia Initialization

Run the following command to init Selia:

Components

Use the Selia CLI to add components to your project:

Import the component in your app:

src/App.tsx

You can use any font you like, but Selia was designed with Inter and JetBrains Mono.

Add the following to your CSS file:

app.css

Icons (optional)

You don’t need to install a separate icon library. We embed icons as SVGs directly inside the components that need them. This way, you’re free to use any icon library you like, without worrying about breaking other components.