Skip to main content

Customization

1. Colors​

  • src/theme/index.ts

Add or edit the colors you want

 colors: {
...theme,
primary: "#4220CE",
"carolina-blue": "#1DA1F2",
"cyber-yellow": "#FFF279",
"golden-sand": "#F0DF67",
"radical-red": "#FA4169",
"patrick-blue": "#215191",
"light-salmon": "#4B9BAE",
"go-green": "#0EAD69",
"y-in-mn-blue": "#3E517A",
"sematic-orange": "#FE9870",
basic: {
100: "#FFFFFF",
200: "#F7F8F9",
300: "#F5F7FA",
400: "#E4E7EB",
500: "#CBD2D9",
600: "#A6B0BA",
700: "#7B8794",
800: "#616E7C",
900: "#52606D",
1000: "#3E4C59",
1100: "#323F4B",
1200: "#1F2933",
1300: "#192129",
1400: "#101419",
},
},

2. Theme Variables​

This allows you to easily create themed components by using theme variables

  • src/theme/index.ts
  semanticTokens: {
colors: {
error: "red.500",
"text-title": {
default: "black",
_dark: "white",
},
"bg-main": {
default: "white",
_dark: "gray.900",
},
},
},

or you can use hooks

  • src/hooks/useColor.ts
  const text1 = useColorModeValue("basic.1200", "white");     //#1F2933 - #FFFFFF
const text2 = useColorModeValue("basic.500", "basic.900"); // #CBD2D9 - #52606D

Declare Custom Component​

Let's declare a View and set it backgroundColor to any color of current theme.

  • src/theme/components/Button.ts

1.Button​

const Button = {
baseStyle: {},
sizes: {
lg: {
lineHeight: "100%",
alignItems: "flex-end",
fontSize: "16px",
py: "13px",
},
},
variants: {
solid: (props: any) => ({
bg: "primary",
color: props.colorMode === "dark" ? "basic.100" : "basic.200",
_hover: {
bg: props.colorMode === "dark" ? "basic.1100" : "basic.400",
color: props.colorMode === "dark" ? "basic.500" : "basic.900",
_disabled: {
bg: "basic.400",
color: "#1F293330",
},
},
_active: {
bg: "y-in-mn-blue",
color: "basic.100",
border: "none",
},
_disabled: {
bg: "basic.400",
color: "#1F293330",
opacity: 1,
},
rounded: "full",
}),
},
defaultProps: {},
};

export { Button };

OUR PRODUCTS:​

Thank you!