A utility-first CSS framework packed with numerous classes. It helps to build UI faster with it's classes.
Here in this example it includes the example of tailwindcss with npm.
.
βββ dist
| βββ style.css # TailwindCSS Output File
βββ screenshot
| βββ result.png # Result Screenshot
βββ src
βββ index.html # Main HTML File
βββ style.css # Custom CSS Style
- Run the command to generate package.json file
npm init -y
- Run the following command to install tailwindcss
npm install -D tailwindcss
- Run the command to generate tailwind.config.js which include the configuration of the tailwind css.
npx tailwindcss init
- Run the command to to scan your template files for classes and build your CSS.
npx tailwindcss -i ./src/style.css -o ./dist/style.css --watch
Now You're able to load dist/style.css as tailwind css file.
Run the HTML File to see the Result, You may check screenshot/result.png to see the result.