Git Product home page Git Product logo

Comments (5)

NickDunas avatar NickDunas commented on May 10, 2024 1

Please take a look at this file: https://github.com/rewindui/rewindui/blob/main/packages/core/src/theme/styles/Button.styles.ts

This is the cva file of the Button component. If you scroll down a bit you will notice that for the combination of color blue and tone solid I am indeed using bg-blue-500.

All style files on Rewind-UI are using the cva library, which you can check out here: https://cva.style/docs/getting-started/variants

Now you can use the ThemeProvider and completely adjust the styles of any component. You can read more about it here: https://rewind-ui.dev/theming

It is really easy, give it a try and let me know what you think and if you managed to adjust it the way you want! 😃

from rewindui.

NickDunas avatar NickDunas commented on May 10, 2024

Hello Jo,

Could you post your code as well please?

from rewindui.

JoDarma-lp avatar JoDarma-lp commented on May 10, 2024

Tailwind usage :

<Button type="submit" className={`bg-blue-500`}>
     S' inscrire
 </Button>

Capture d’écran 2023-06-22 à 14 05 36

It work great !

With rewind color property :

<Button type="submit" color="blue-500">
     S' inscrire
 </Button>

Capture d’écran 2023-06-22 à 14 06 53

Not work !

Simple color property :

<Button type="submit" color="blue">
     S' inscrire
 </Button>

Capture d’écran 2023-06-22 à 14 12 28

work great !

from rewindui.

NickDunas avatar NickDunas commented on May 10, 2024

Looks like you are trying to pass an invalid color value.

The available color values are: white, blue, red, green, yellow, purple, gray, dark and black.

You can read about it on the docs at the Tones & Color section here: https://rewind-ui.dev/components/button

Not sure why you are trying to pass the blue-500 value though and not just use the color="blue" value!

from rewindui.

JoDarma-lp avatar JoDarma-lp commented on May 10, 2024

Yep, in tailwind you can defined gradient of your color and sometimes you want to use the gradient of the principal color for colorise your UI.
Capture d’écran 2023-06-22 à 14 19 07

So I can use bg-blue-500 bg-blue-800 for different gradient of my custom blue

It's a frequent use case, so rewind ui should consider it for further customization

Otherwise the solution of using tailwind's classes suits me very well, if indeed it is not possible for rewind.ui considered the color gradients in the "color" property

from rewindui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.