NuxtUI Coloring with TailwindCSS Color Object
Hi :)
Here's what I'm trying to achieve
I am trying to customize the elements in the Pagination NuxtUI component by coloring it with my custom Tailwind CSS class. (See image reference)
I'm stuck on trying to use the different shades of my defined Tailwind CSS color.
tailwind.config.ts
Here's how I tried
* Defined the color in tailwind.config.ts
(see code above)
* Defined the config
property of the NuxtUI element I'm trying to modify in the app.config.ts
file:
* With this snippet, I could get it to use some value from the defined shades, but I can't define which one it should use.
Clues (Ignore if too confusing)
* I can see TailwindCSS successfully generating the classes,
from the /_tailwind
route. (See image references)
However, using these classes do not have effect when passed to the color prop.
* The color property takes predefined values as an argument, that are defined here .nuxt/ui.colors.d.ts
. My custom color is declared there, however, without any of the shades I defined. (See File in Demo Project below)
Thanks in advance!
Demo:
https://stackblitz.com/edit/nuxt-ui-biu6pb?file=app.vue,app.config.ts,tailwind.config.ts,.nuxt%2Fui.colors.d.ts
Tailwind Object Syntax:
https://tailwindcss.com/docs/customizing-colors#color-object-syntax
Pagination Docs:
https://ui.nuxt.com/components/pagination0 Replies