You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For those of you using Vuetify, you've probably already had to come up with a way to synchronize the colors of VueDataUI components with Vuetify's ability to switch between light and dark modes. Maybe @graphieros will create light and dark modes in the future :P
If you're struggling with ways to easily synchronize colors, here's a way I have found useful. It leverages composables within Vue, enabling reactive updates to all VueDataUI components based on the current Vuetify theme.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello again everyone.
For those of you using Vuetify, you've probably already had to come up with a way to synchronize the colors of VueDataUI components with Vuetify's ability to switch between light and dark modes. Maybe @graphieros will create light and dark modes in the future :P
If you're struggling with ways to easily synchronize colors, here's a way I have found useful. It leverages composables within Vue, enabling reactive updates to all VueDataUI components based on the current Vuetify theme.
Related reading
Note: I'm using
VueUiScatterfor this example, but they're all very similar.It starts with
useConfigThis composable allows you to set all colors for each component, and then automatically apply them by overriding the component configurations.
useColorscomposableuseTitlecomposableuseLegendcomposableuseTooltipcomposableApplying this methodology
Beta Was this translation helpful? Give feedback.
All reactions