import { ColorNeutral100, ColorNeutral900, Size5, Size3, Size2,} from "@root-axis/design-tokens/js/tokens.js";
How to use it:
// Get the button element from the DOMconst button = document.querySelector("button");// Apply styles dynamically to the button element// Assuming there is already a button in the DOM ⚠️button.style.color = ColorNeutral100;button.style.backgroundColor = ColorNeutral900;button.style.paddingInline = Size5;button.style.paddingBlock = Size3;button.style.borderRadius = Size2;button.style.border = "none";
TS imports follow the PascalCase format
import { ColorNeutral100, ColorNeutral900, Size5, Size3, Size2,} from "@root-axis/design-tokens/ts/tokens";
How to use it:
// Get the button element from the DOMconst button = document.querySelector("button") as HTMLButtonElement;// Apply styles dynamically to the button element// Assuming there is already a button in the DOM ⚠️button.style.color = ColorNeutral100;button.style.backgroundColor = ColorNeutral900;button.style.paddingInline = Size5;button.style.paddingBlock = Size3;button.style.borderRadius = Size2;button.style.border = "none";
import tokens from "@root-axis/design-tokens/json/tokens.json"
Define consistent sizes for typography, spacing, and other layout properties.
You can use this approach to easily style various CSS properties, such as
font-size, gap, padding, margin, border-width, line-height,
width, height, and more