Skip to content
GitHub (opens in a new tab)

GradientText

A restrained, token-based gradient fill for one rare heading (a docs hero, an empty-state title). Real text, never an image; no motion.

stableAtomcontracts/gradienttext.json

Preview

GradientText

A restrained, token-based gradient fill for one rare heading (a docs hero, an empty-state title). Real text, never an image. No motion.

Master

The default ink tone on one heading. Both ends of the gradient keep 4.5:1 against the surface. Variants shows brand and inverse.

Ship agents people trust

Usage

One heading per view, on a hero or empty state. ink runs text.fg to the brand colour; brand runs the brand colour to primary.fg. Use inverse on surface.inverse. Under forced colours, or where background-clip: text is missing, it is solid text.fg. It does not animate.

Do's

  • one hero or empty-state heading per view
  • a marketing or docs headline that needs a touch of brand

Don'ts

  • body copy, labels, buttons or data
  • more than one heading per view
  • status or meaning — use Badge or status text
<GradientText>Ship agents people trust</GradientText>

When to use

  • one hero or empty-state heading per view
  • a marketing or docs headline that needs a touch of brand

When not to use

  • body copy, labels, buttons or data
  • more than one heading per view
  • status or meaning — use Badge or status text

What an agent reads

import { GradientText } from "agentic-ds-kit";
must
  • real text, selectable and read as written
  • both gradient ends keep ≥ 4.5:1 against their surface
  • solid text.fg (CanvasText) under forced colours; solid text.fg where background-clip: text is unsupported
defaults
  • as h2
  • tone ink
  • inverse false
stops if
  • Do not render it as an image
  • Do not add a colour ramp or hex stops
  • Do not animate it

From contracts/gradienttext.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.

Props

NameTypeRequiredDefaultNotes
childrennodeYes——
ash1 | h2 | h3 | spanNoh2—
toneink | brandNoinkink: text.fg → text.brand; brand: text.brand → primary.fg. Paper's overlay (brand → violet) waits for the violet role decision.
inversebooleanNofalseOn surface.inverse: bg.canvas → info line.
  • Component
    →

    Badge

    Compact read-only status or category pill set by the system.