Flowbite - Tailwind CSS component library

Get started with the most popular open-source library of interactive UI components built with the utility classes from Tailwind CSS

Introduction #

Nextjs is an open-source React front-end development web framework that enables functionality such as server-side rendering and generating static websites for React based web applications. It is a production-ready framework that allows developers to quickly create static and dynamic JAMstack websites and is used widely by many companies including Netflix, Uber, and Hulu.

Using Flowbite #

One of the disadvantages of Tailwind CSS compared to other frameworks is that it doesn’t have a base set of components. This makes it really hard to quickly prototype a user interface.

This is where Flowbite comes into play: it’s basically Tailwind CSS, but you get all of the components that you would normally get with a classic CSS framework like Bootstrap or Bulma.

There are 52 types of UI components including buttons, alerts, breadcrumbs, pagination, and navbars. Flowbite also includes some custom JavaScript that enables interactive components, such as dropdowns, modals, tooltips, and many more.

Getting started #

Flowbite is technically a plugin that can be included into any existing Tailwind CSS project. To get started, you first need to make sure that you have a working Tailwind CSS project installed and that you also have Node and NPM installed on your machine.

Require via NPM #

  1. Install the latest version of Flowbite using NPM:
npm i flowbite
  1. Include Flowbite as a plugin inside the tailwind.config.js file:
module.exports = {
  plugins: [require("flowbite/plugin")],
};
  1. Require the JavaScript code that powers the interactive elements before the end of your <body> tag:
<script src="../path/to/flowbite/dist/flowbite.js"></script>
  1. Additionally to your own content data you should add flowbite to apply the classes from the interactive elements in the tailwind.config.js file:
module.exports = {
  content: ["./node_modules/flowbite/**/*.js"],
};

If you use Webpack or other bundlers you can also import it like this:

import "flowbite";

Include via CDN #

If you want to quickly test out Flowbite you can easily include the following CSS and JavaScript files.

Require the following minified stylesheet inside the head tag:

<link
  rel="stylesheet"
  href="https://unpkg.com/[email protected]/dist/flowbite.min.css"
/>

And include the following javascript file before the end of the body element:

<script src="https://unpkg.com/[email protected]/dist/flowbite.js"></script>

Please remember that the best way to work with Tailwind CSS and Flowbite is by purging the CSS classes.

Tailwind CSS 2.0 #

Flowbite is fully compatible with the 2.x versions of Tailwind CSS.

Tailwind CSS 3.0 #

Feel free to upgrade to version 3 of Tailwind CSS as there are no breaking changes when using the components from Flowbite.

Figma #

The components from Flowbite are first conceptualized and designed in Figma using the latest features such as variants, auto-layout, grids, responsive layouts, and more.

Learn more by checking out Flowbite’s Figma design system and start designing your Tailwind CSS projects before actually coding them.

Next.js #

If you’re using React as a front-end library and Next.js as a framework you can also use the components from Flowbite React such as the modals, dropdowns, and navbars to speed up your development time coupled with the utility classes from Tailwind CSS.

Learn how to install Tailwind CSS and Flowbite with Next.js and React.