TE Logo

Tailwind-Elements Vite Starter

>> Support Tailwind-Elements with a STAR

>> Tailwind Docs

Total Downloads Latest Release YouTube Video Views


warning: The use of this Starter is at your own risk and assumes basic knowledge of Vite, JavaScript and CSS preprocessors. We recommend creating custom versions of Tailwind-Elements and themes only for advanced developers.


Installation

npm install

Dev Server

npm start

Build

npm run build

Features:

Files structure:

.
├── src
│   ├── js/
│   └── scss/
├── dist/
├── tailwind.config.cjs
├── vite.config.js
└── index.html




Tailwind-Elements

Importing JS modules

If you want to use the power of ES modules, import the component you need and init it with initTE method

import { Carousel, initTE } from "tw-elements";
initTE({ Carousel });

If you are using an UMD format you can import the entire library:

import 'tw-elements';

Importing TE plugin

To add Tailwind-Elements plugin, please add the following code to tailwind.config.cjs:

plugins: [require('tw-elements/dist/plugin.cjs')]