Replies: 2 comments 1 reply
-
Hi there @robaish! 👋 Thanks for taking the time to open up this discussion! Totally get what you mean for customizing higher-level primitives when it comes to custom theming. I believe your approach with providing a If this custom object uses a different value for that named primitive, it should resolve to that instead of the default from primer/primitives. Hope that makes sense! Let me know if you have any questions or if I'm misunderstanding anything 👀 |
Beta Was this translation helpful? Give feedback.
-
Hey @joshblack with the migration to CSS variables (as stated in https://github.com/primer/react/blob/main/packages/react/src/legacy-theme/README.md). I guess that the best path to use a custom theme is no more to create a custom theme for the |
Beta Was this translation helpful? Give feedback.
-
TL;DR: is it possible to customize/define own Primitives that Primer React's
theme
object would fetch?I'm basing a design system on Primer and I've created a
customTheme
object that's passed on toThemeProvider
. However, rather than e.g. defining all colors separately for each component in thecustomTheme
, it would be nice to customize higher-level primitives directly. Is this possible to do and how?There's a separate repo for Primitives so I thought about forking it, and perhaps there's a way to tell Primer React or our build tool (we use Vite) to not fetch the default Primitives and instead fetch the custom Primitives.
Any ideas greatly appreciated! 🙏
Beta Was this translation helpful? Give feedback.
All reactions