Use with RedwoodJS - Flowbite React
Learn how to install Flowbite React for your RedwoodJS project and start developing modern full-stack web applications
This guide provides three ways to integrate Flowbite React with RedwoodJS:
- Quick Start: Create a new project with everything pre-configured
- Add to Existing Project: Add Flowbite React to an existing RedwoodJS project
- Manual Setup: Set up everything from scratch manually
Quick Start (Recommended)
#
Quick StartThe fastest way to get started is using our project creation CLI, which sets up a new RedwoodJS project with Flowbite React, Tailwind CSS, and all necessary configurations:
npx create-flowbite-react@latest -t redwoodjs
This will:
- Create a new RedwoodJS project
- Install and configure Tailwind CSS
- Set up Flowbite React with all required dependencies
- Configure necessary project settings
- Set up example components
Add to Existing Project
#
Add to Existing ProjectIf you already have a RedwoodJS project and want to add Flowbite React, you can use our initialization CLI:
npx flowbite-react@latest init
This will automatically:
- Install Flowbite React and its dependencies
- Configure Tailwind CSS to include Flowbite React plugin
- Set up necessary configurations
Manual Setup
#
Manual SetupIf you prefer to set everything up manually or need more control over the configuration, follow these steps:
#
1. Create ProjectCreate a new RedwoodJS project:
yarn create redwood-app my-redwood-app
cd my-redwood-app
yarn install
Create a new homepage using the CLI:
yarn redwood generate page home /
#
2. Configure Tailwind CSSInstall Tailwind CSS using the RedwoodJS CLI:
yarn rw setup ui tailwindcss
This will automatically:
- Install Tailwind CSS and its dependencies
- Create and configure the necessary Tailwind configuration files
- Update your CSS files to include Tailwind directives
#
3. Install Flowbite ReactSetup VSCode using Flowbite React CLI:
npx flowbite-react@latest setup vscode
Install Flowbite React in web
directory:
cd web && npx flowbite-react@latest init
This will:
- Install Flowbite React and its dependencies
- Configure Tailwind CSS to include Flowbite React plugin
- Configure Vite to include Flowbite React plugin
#
Try it outNow that you have successfully installed Flowbite React you can start using the components from the library:
// web/src/pages/HomePage/HomePage.tsx
import { Button } from "flowbite-react";
export default function HomePage() {
return (
<>
<Button>Click me</Button>
</>
);
}