Skip to content

Themeing the Button Component #11313

Answered by tay1orjones
masonkieth asked this question in Help
Discussion options

You must be logged in to vote

Hey there! Thanks for your patience and sorry for this lack of clear docs. We've updated the documentation covering component tokens here

Copying an example from those docs here, this is what it would look like to configure button component tokens per theme:

@use '@carbon/react/scss/themes';
@use '@carbon/react/scss/components/button/tokens' with (
  $button-primary: (
    fallback: #3f51b5,
    values: (
      (theme: themes.$white, value: #3f51b5),
      (theme: themes.$g10, value: #d55bff),
      (theme: themes.$g90, value: #d0b2ff),
      (theme: themes.$g100, value: #cfd2ff),
    ),
  )
);

@use '@carbon/react/scss/reset';
@use '@carbon/react/scss/components/button';

You can also cha…

Replies: 3 comments 2 replies

Comment options

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

Comment options

You must be logged in to vote
1 reply
@stanley-regnard
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by tay1orjones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
5 participants