useTextColor

Commons
stable

Foreground-only color helper. Resolves the `color` prop to a utility class (`origam--color-*`) for tokenised intents, or to an inline `color:` declaration for raw CSS values and gradients.

API

Signature

Signature TypeScript complète extraite du fichier du composable.

typescript

Interfaces consommées

IColorProps

API

Paramètres

Paramètres d'entrée acceptés par ce composable.

props
requis
T | Ref<TColor>
Either the component props object (paired with `name`) or a plain Ref<TColor>.
name
K
The key to read from the props object. Typically "color". Omit when passing a plain Ref.

API

Valeurs de retour

Propriétés et méthodes exposées par l'objet retourné par le composable.

textColorClasses
Utility class names (e.g. ["origam--color-primary"]) to bind via :class.
textColorStyles
Inline CSS declarations (e.g. ["color: #6d28d9"]) to bind via :style. For gradients, includes background-image + background-clip: text.

Usage

Exemples

Extraits de code prêts à coller.

Color an icon with an intent

vue