Skip to content

How can I get some value (that I defined) inside tailwind.config.js file? #12999

Answered by wongjn
evgeniy-vashchuk asked this question in Help
Discussion options

You must be logged in to vote

Have your colors as an object and then reference that object:

const myColors: {
  inherit: 'inherit',
  current: 'currentColor',
  transparent: 'transparent',
  'white': '#FFFFFF',
  'black': '#0C1A35',
   'gray': '#D9DBDD',
  'gray-light': '#F4F4F5',
  'yellow': '#FFE759',
  'orange': '#FF7300',
};

export default {
  theme: {
    colors: {
      ...myColors,
      primary: myColors.orange,

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@evgeniy-vashchuk
Comment options

@wongjn
Comment options

@evgeniy-vashchuk
Comment options

@tylerrrkd
Comment options

Answer selected by evgeniy-vashchuk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants