2024-05-27 19:18:44 +00:00
|
|
|
<template>
|
|
|
|
<DocSectionText v-bind="$attrs">
|
|
|
|
<p>
|
|
|
|
The <a href="https://www.npmjs.com/package/tailwindcss-primeui" target="_blank" rel="noopener noreferrer">tailwindcss-primeui</a> is an official plugin by PrimeTek to provide first class integration between a Prime UI library like
|
|
|
|
PrimeVue and Tailwind CSS. It is designed to work both in styled and unstyled modes. In styled mode, for instance the semantic colors such as primary and surfaces are provided as Tailwind utilities e.g. <i>bg-primary</i>,
|
|
|
|
<i>text-surface-500</i>, <i>text-muted-color</i>.
|
|
|
|
</p>
|
2025-02-24 06:58:16 +00:00
|
|
|
<p>
|
2025-02-24 11:26:37 +00:00
|
|
|
If you haven't already done so, start by integrating Tailwind into your project. Detailed steps for this process can be found in the Tailwind <a href="https://tailwindcss.com/" target="_blank" rel="noopener noreferrer">documentation</a>.
|
|
|
|
After successfully installing Tailwind, proceed with the installation of the PrimeUI plugin. This single npm package comes with two libraries: the CSS version is compatible with Tailwind v4, while the JS version is designed for Tailwind
|
|
|
|
v3.
|
2025-02-24 06:58:16 +00:00
|
|
|
</p>
|
2024-05-27 19:18:44 +00:00
|
|
|
<DocSectionCode :code="code1" hideToggleCode importCode hideStackBlitz />
|
2025-02-24 06:58:16 +00:00
|
|
|
<h3>Tailwind v4</h3>
|
|
|
|
<p>In the CSS file that contains the tailwindcss import, add the <i>tailwindcss-primeui</i> import as well.</p>
|
2024-05-27 19:18:44 +00:00
|
|
|
<DocSectionCode :code="code2" hideToggleCode importCode hideStackBlitz />
|
2025-02-24 06:58:16 +00:00
|
|
|
<h3>Tailwind v3</h3>
|
2025-02-24 11:26:37 +00:00
|
|
|
<p>Use the plugins option in your Tailwind config file to configure the plugin.</p>
|
2025-02-24 06:58:16 +00:00
|
|
|
<DocSectionCode :code="code3" hideToggleCode importCode hideStackBlitz />
|
2024-05-27 19:18:44 +00:00
|
|
|
</DocSectionText>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
code1: {
|
|
|
|
basic: `
|
|
|
|
npm i tailwindcss-primeui
|
|
|
|
`
|
|
|
|
},
|
|
|
|
code2: {
|
|
|
|
basic: `
|
2025-02-24 06:58:16 +00:00
|
|
|
@import "tailwindcss";
|
|
|
|
@import "tailwindcss-primeui";
|
|
|
|
`
|
|
|
|
},
|
|
|
|
code3: {
|
|
|
|
basic: `
|
2024-05-27 19:18:44 +00:00
|
|
|
// tailwind.config.js
|
2025-02-24 06:58:16 +00:00
|
|
|
import PrimeUI from 'tailwindcss-primeui';
|
|
|
|
|
|
|
|
export default {
|
2024-05-27 19:18:44 +00:00
|
|
|
// ...
|
2025-02-24 06:58:16 +00:00
|
|
|
plugins: [PrimeUI]
|
2024-05-27 19:18:44 +00:00
|
|
|
};
|
|
|
|
`
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|