Skip to Content
Docs🚀 ⏐ Getting StartedSetup

Setup

This section will guide you through the initial steps required to integrate Tailwind CSS into your project. Tailwind CSS is a utility-first CSS framework that can be customized to fit the design needs of your project. Follow these instructions to ensure a smooth setup.  

Install

The fastest way to set up reablocks in an existing React project is the official CLI. From the root of your project:

npx reablocks-cli@latest init
~/myapp · reablocks-clilive
$npx reablocks-cli@latest init
This command assumes a React project.
If you don't have these, follow the manual steps at https://reablocks.dev/docs/getting-started/setup
Detected react-router from package.json — pre-selecting in prompt.
Which framework are you using? React Router (RR7 / Remix)
Default reablocks theme? Dark (default)
Running this command will install dependencies and may modify your stylesheet + app entry. Proceed? … yes
Installing reablocks...
Installing tailwindcss...
Found stylesheet: app/app.css
Apply this change to app/app.css? … yes
Wiring Tailwind v4 into app/app.css...
Found host: app/root.tsx
Apply this change to app/root.tsx? … yes
Adding theme-dark class to app/root.tsx
Apply this change to app/root.tsx? … yes
Wiring <ThemeProvider /> in app/root.tsx...
$

Every edit is previewed and gated behind a Y/n confirm — nothing is written without your approval. Each step is also idempotent, so re-running on a partially configured project only touches what’s missing.

Developing Locally

If you want to run the project locally, its really easy!

The project uses Storybook for its demos and development environment. To run it locally:

  • Clone the repository. First, clone the repository to your local machine using Git:
git clone git@github.com:reaviz/reablocks.git
  • Install dependencies. Navigate to the project directory and install the necessary dependencies:
npm install
  • Start Storybook. Once the installation is complete, start the Storybook development server:
npm start

Result: This command runs Storybook locally and opens it in your default web browser at http://localhost:9009. You can now view your components, experiment with their properties, and see changes in real-time.  

Building for Distribution with Rollup

Our project uses Rollup for bundling and preparing the package for distribution. To build the project, simply run:

npm run build

Result: This command generates a dist folder containing the bundled JavaScript, CSS files, and type definitions, ready for deployment or distribution.

Last updated on