Installation
Quickly set up Preline UI Tailwind CSS library for your project. Browse Tailwind components and UI elements such as buttons, grids, tables, and more.
This guide will help you get started with Preline UI, including how to run, customize, update, and integrate your project!
First, you 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.
Install preline
via npm
npm i preline
Please note, Preline UI uses Tailwind CSS Forms plugin in all form components. Don't forget to install it, if you haven't done so already: npm install -D @tailwindcss/forms
Include Preline UI as a plugin in the tailwind.config.js
file.
// tailwind.config.jsmodule.exports = { content: [ // './src/**/*.{html,js}', 'node_modules/preline/dist/*.js', ], plugins: [ // require('@tailwindcss/forms'), require('preline/plugin'), ],}
Include the JavaScript <script>
that powers the interactive elements near the end of your </body>
tag:
// index.html<script src="./node_modules/preline/dist/preline.js"></script>
Looking for a way to install Preline UI with your frameworks and build tools?
It's an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
Based on the Tailwind CSS utility classes, Preline UI's prebuilt components and UI elements help you quickly design and customize responsive mobile-first websites with diverse predefined components (such as modals, buttons, alerts, cards and more).
Components are grouped by visual usability criteria (components, navigation, forms, etc.) and styled directly on top of Tailwind CSS, making them easy to extend and customize. This is a lifesaver for developers looking to create a unique and eye-catching design system without the hassle of creating each component by hand.