Select to view content in your preferred language

Calcite Components with Tailwind CSS

85
3
Jump to solution
Wednesday
ForrestLin
Frequent Contributor

Is it OK to use Tailwind CSS with Calcite Components?

ForrestLin_0-1764767799900.pngForrestLin_1-1764767987352.png

 

 

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
DitwanDPrice
Esri Contributor

Yes it is, there's a calcite tailwind preset package that can be found here: https://www.npmjs.com/package/@esri/calcite-tailwind-preset?activeTab=readme

View solution in original post

0 Kudos
3 Replies
DitwanDPrice
Esri Contributor

Yes it is, there's a calcite tailwind preset package that can be found here: https://www.npmjs.com/package/@esri/calcite-tailwind-preset?activeTab=readme

0 Kudos
ForrestLin
Frequent Contributor

@DitwanDPrice 

Thank you!

Forrest

0 Kudos
ForrestLin
Frequent Contributor

How to use calcite tailwind preset package?

I tried to install the package: npm i @esri/calcite-tailwind-preset, and I got error:

ForrestLin_0-1764877547112.png

Successfully installed by running

npm i @esri/calcite-tailwind-preset --force or --legacy-peer-deps

I got:

ForrestLin_1-1764877840344.png

I need to import it in the Tailwind CSS configuration file:

import calcitePreset from "@esri/calcite-tailwind-preset";

export default {

       presets: [calcitePreset],

       content: [ /* ... */ ],

};

Where is the Tailwind CSS configuration?

0 Kudos