Theming with Vuetify #237
tjones-ieee
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
VueUiScatter
for this example, but they're all very similar.It starts with
useConfig
This composable allows you to set all colors for each component, and then automatically apply them by overriding the component configurations.
useColors
composableuseTitle
composableuseLegend
composableuseTooltip
composableApplying this methodology
Beta Was this translation helpful? Give feedback.
All reactions