ValyroUI Русская версия

Color Token

Color token: swatch or row with the variable, value and copy. Pro · Landing pages and brand › Brand and design system

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add color-token
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ColorToken } from 'valyro-ui-pro';

Props

PropTypeDefault
name *ReactNodeToken name: "Accent".
usageReactNodeWhere it is used: "Primary", "Text on accent".
color *stringAny CSS color painted in the swatch.
tokenstringCSS variable or design token: "--accent".
valuestringPrinted value: "#543CFC", "15%". Default: the color itself.
layout'plate' | 'tile''plate'plate: a large colored card; tile: a small swatch beside the text. Default plate.
ink'light' | 'dark' | 'auto''auto'Text color on a plate: light, dark, or picked from the color (hex or rgb(); other syntaxes get light text). Default auto.
copyablebooleanfalseAdds a button that copies the value.
labelsPartial<ColorTokenLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Theme Customizer · Next: Type Specimen · All Landing pages and brand