From 906714394f9093749fd0433510cfa373e8f104e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Sz=C5=91gy=C3=A9nyi?= Date: Sat, 30 Oct 2021 17:45:28 +0300 Subject: [PATCH] Update readme. --- README.md | 28 ++++++++++++++++++++++++++- content/getting-started/quickstart.md | 3 ++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c07bbf3ed..48db1de67 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,38 @@ There are multiple ways that you can include it into your project. ## Require via NPM -You can also require FlowBite as a dependency using NPM by running the following command: +Make sure that you have Node.js and Tailwind CSS installed. + +1. Install Flowbite as a dependency using NPM by running the following command: ```bash npm i @themesberg/flowbite ``` +2. Require Flowbite as a plugin inside the `tailwind.config.js` file: + +```javascript +module.exports = { + + plugins: [ + require('@themesberg/flowbite/plugin'), + ], + +} +``` + +3. Include the main JavaScript file to make interactive elements work: + +```html + +``` + +If you use Webpack or other bundlers you can also import it like this: + +```javascript +import '@themesberg/flowbite'; +``` + ## Include via CDN The quickest way to get started working with FlowBite is to simply include the CSS and JavaScript into your project via CDN. diff --git a/content/getting-started/quickstart.md b/content/getting-started/quickstart.md index e9c4c4523..96688ba7a 100644 --- a/content/getting-started/quickstart.md +++ b/content/getting-started/quickstart.md @@ -17,7 +17,7 @@ Flowbite is a library of components built on top of the utility-classes from Tai Make sure that you have Node.js and Tailwind CSS installed. -1. Then install Flowbite as a dependency using NPM by running the following command: +1. Install Flowbite as a dependency using NPM by running the following command: ```bash npm i @themesberg/flowbite @@ -62,6 +62,7 @@ And include the following javascript file before the end of the `body` element: ```html ``` + ## Github repository The source files are also available to be cloned or downloaded from the official FlowBite Github repository. Don't forget to give it a star if you appreciate the project.