Replies: 5 comments 5 replies
-
@VinSpee |
Beta Was this translation helpful? Give feedback.
-
Exactly. The nested case fails (has nothing to do with the hover state, it's due to that token being nested an additional level) |
Beta Was this translation helpful? Give feedback.
-
Yeah, the ability to extend this functionality would be huge... |
Beta Was this translation helpful? Give feedback.
-
@VinSpee could you please check it in this Draft build of playground https://panda-playground-git-issue-1062-expand-colorpa-125510-chakra-ui.vercel.app/? |
Beta Was this translation helpful? Give feedback.
-
I must have been missing something – it's working @isBatak |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
expand the flexibility of the Virtual Color feature by allowing for un-opinionated nested object definitions
Problem Statement/Justification
Hi! I've been using panda in two large projects. As a former Chakra user and a tailwind tolerator, I was delighted to hop on the panda train as quickly as possible and guide my teams in that direction.
One idea I really like is Virtual Color.
I like to build component libraries in a very flexible way, and a technique I use is to provide
aesthetic
andcolor
props. In panda, I model it like this:This is straightforward enough.
However, in my current project, we're taking an approach where we lean into semantic tokens, with a theme configuration like so:
which means I want to define my button like this:
This doesn't work.
Proposed Solution or API
I see in the docs that
colorPalette
requires 50–900 keys.colorPalette
have an opinion about its shape?Alternatives
50
-900
colorPalette
or Virtual Color at allAdditional Information
Here's a failing case: https://play.panda-css.com/XIIQGvJhd9
Thanks for the excellent work on the project – it makes building UIs so fun, and is the most lovely successor to chakra, which I loved for a long time.
Beta Was this translation helpful? Give feedback.
All reactions