Inkbridgeinkbridge
Free

Gradient Rendering

Linear, radial, and 3-stop gradients — including clip-path blob shapes — are converted to native Figma gradient fills with correct direction, stops, opacity, and masking.

Gradient types in Storybook

Linear gradient story in Storybook
Linear
Radial gradient story in Storybook
Radial
3-stop gradient story in Storybook
3-stop
Blob gradient story in Storybook
Blob

Rendered in Figma

All gradient variants rendered in Figma with both themes
All gradient types rendered in Figma — Primary and Secondary themes

How it works

The plugin parses `bg-gradient-to-{direction}`, `bg-linear-to-{direction}`, and `bg-radial` utilities and converts them to Figma `GRADIENT_LINEAR` or `GRADIENT_RADIAL` fills. Direction strings are translated into Figma gradient transform matrices by rotating around the centre point (0.5, 0.5). Three-stop gradients work via `via-{color}` — the intermediate stop lands at 50%. Gradient opacity is applied to the fill itself (not the frame) so child elements stay unaffected. The renderer also handles decorative gradient blob elements: CSS `clip-path: polygon(...)` is parsed from inline styles and converted to a native Figma vector shape, then the gradient fill, blur filter, and rotation are applied to that shape — reconstructing complex hero backgrounds faithfully.

Usage

  1. 1

    Use any Tailwind gradient utility: `bg-gradient-to-r`, `bg-gradient-to-br`, `bg-radial`, etc.

  2. 2

    Add `from-{color}`, optionally `via-{color}`, and `to-{color}` to define the stops.

  3. 3

    For decorative blobs, add `clip-path: polygon(...)` as an inline style — the plugin converts it to a Figma vector.

  4. 4

    Run 'Generate Design System Page' — gradients, blur, and rotation are all applied natively.

  5. 5

    Gradient opacity (e.g. `from-primary/50`) is preserved as fill opacity rather than frame opacity.

Related