Understand Design Tokens
masterDesign Tokens provide semantic meaning to the color system by mapping contextual usage to system colors. They follow a specific naming pattern: $[property][Semantic][Weight].
Token Structure
- Property: The UI element the token applies to (
background,text,icon,outline). - Semantic: The contextual meaning (
neutral,primary,general,success,warning,danger,disabled,inverted,default). - Weight (Optional): The color intensity (
light,medium,heavy).
Examples
$backgroundPrimaryHeavy: A heavy primary background color.$textSuccess: Success-themed text color.$iconWarning: Warning-themed icon color.