IGradient
interface
Color & Intent
Structured gradient descriptor — one of the three accepted formats for color/bgColor/textColor props. Supports linear, radial and conic types; short form (from/to/via) or full form (stops array).
TypeScript
Définition
La définition TypeScript de l'interface telle que trouvée dans le code source d'origam. Cliquez sur l'icône de copie pour copier l'extrait.
API
Propriétés
Chaque propriété déclarée par cette interface, avec son type, son caractère optionnel et sa valeur par défaut.
- type'linear' | 'radial' | 'conic'
- Gradient type. Defaults to "linear".
- fromTIntent | string
- Start color of the short-form 2–3 stop gradient. A TIntent alias or raw CSS color.
- toTIntent | string
- End color of the short-form gradient.
- viaTIntent | string
- Optional middle color of the short-form gradient, auto-positioned at 50%.
- directionnumber | string
- Angle in degrees (default 135) or a CSS keyword such as "to right" / "to bottom left". For radial/conic, used as the shape/position prefix (e.g. "circle at center").
- stopsIGradientStop[]
- Full-form stop list — overrides from/to/via entirely when provided. Each entry is an IGradientStop with a color and a percentage position.
Écosystème
Utilisé par
Composants et composables qui étendent ou consomment cette interface.
Usage
Exemples
Extraits de code prêts à coller utilisant cette interface.
Short form — from / to
Full form — explicit stops