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
Definition
The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.
API
Properties
Every property declared by this interface, with its type, optionality and default.
- 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.
Ecosystem
Used by
Components and composables that extend or consume this interface.
Usage
Examples
Ready-to-paste code snippets using this interface.
Short form — from / to
Full form — explicit stops