Skip to content

Is it possible to separate styles from components? #1492

Discussion options

You must be logged in to vote

Hey @GhostOrder28 -

In most cases you want to use the css props that we expose directly, and avoid trying to pass custom className prop values unless you have a specific use-case. You'll likely run into situations where the internal css collides with the css the class name is trying to apply.

If you have a certain style that you want to use for components across your whole app, you probably want to take a look at the Theming API. You might want to override the baseStyle of the Button component, or define a new appearance entirely in your first example.

Note that not all components have appearance support, or expose all of their styles for being overridden via the theme.

In some cases, it …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@GhostOrder28
Comment options

Answer selected by GhostOrder28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants