gluestack

gluestack Logogluestack

How do you access the colors object outside of the className props ?

andbutsothen posted this in #support
Open in Discord
Avatar
andbutsothenOP
As seen in the docs, you show examples like this one from https://gluestack.io/ui/docs/components/switch ...

 <Switch
  size="md"
  isDisabled={true}
  trackColor={{ false: colors.neutral[300], true: colors.neutral[600] }}
  thumbColor={colors.neutral[50]}
  activeThumbColor={colors.neutral[50]}
  ios_backgroundColor={colors.neutral[300]}
/>


...but there is no explanation in the current docs for how to get access to the colors object. How do you do this in gluestack V2 ?

2 Replies

Avatar
viraj1098