tokenForegroundForIntent

Commons
stable

Resolve the foreground-only CSS token for an intent — the "coloured text on a light surface" rung (fgSubtle). Distinct from tokenStylesForIntent which returns the WCAG-contrasted text placed ON a coloured surface.

API

Signature

Signature TypeScript complète, extraite du fichier util.

typescript

API

Paramètres

Paramètres d'entrée acceptés par cet util.

intent
requis
TIntent
One of the semantic intent values: "primary", "secondary", "ghost", "success", "warning", "danger", "info", "neutral". Each maps to a different `fgSubtle` token rung.

API

Valeur de retour

La valeur retournée par cet util.

A `var(--origam-color__…---fgSubtle)` CSS custom-property reference, ready to bind as a `color` style value.

Usage

Exemples

Extraits de code prêts à coller.

Colour inline text by intent

typescript