Is your feature request related to a problem? Please describe.
Yes, currently RefineThemes does not provide a built-in way to toggle between light and dark modes. For applications that aim to support night-time usage or provide accessibility options, this can be limiting.
I'm always frustrated when I have to manually implement dark mode for each UI provider (Ant Design, Chakra, Mantine) instead of having a consistent Refine-native solution.
Describe alternatives you've considered
- Manually overriding Ant Design/Chakra/Mantine themes at the app level.
- Using Tailwind’s dark mode support with custom logic.
These workarounds are repetitive and not unified across UI providers. It would be more elegant to have a centralized, framework-wide solution from Refine itself.
Additional context
Example usage:
const { mode, toggleTheme } = useThemeToggle();
<button onClick={toggleTheme}>
Switch to {mode === 'light' ? 'dark' : 'light'} mode
</button>
### Describe the thing to improve
I’d like Refine to support a native dark/light mode toggle across themes.
This would involve:
- A hook like `useThemeToggle()` or `useColorMode()` to allow toggling the theme.
- Optional persistence using `localStorage`.
- Extend current `RefineThemes` setup to define light and dark theme variants.
- Possibly a `ThemeProvider` context for managing color scheme globally.
Having this built-in would drastically improve developer experience and is a must-have for modern dashboards.
Is your feature request related to a problem? Please describe.
Yes, currently
RefineThemesdoes not provide a built-in way to toggle between light and dark modes. For applications that aim to support night-time usage or provide accessibility options, this can be limiting.I'm always frustrated when I have to manually implement dark mode for each UI provider (Ant Design, Chakra, Mantine) instead of having a consistent Refine-native solution.
Describe alternatives you've considered
These workarounds are repetitive and not unified across UI providers. It would be more elegant to have a centralized, framework-wide solution from Refine itself.
Additional context
Example usage: