Imgix APIsRendering APITextText Gradient Angle

Text Gradient Angle

txt-gradient-angle

The txt-gradient-angle parameter sets the direction of a txt-gradient. It is only read when the gradient is valid.

Angles follow the CSS convention, so the value names the direction the gradient runs toward:

AngleDirection
0Bottom to top
90Left to right
180 (default)Top to bottom
270Right to left

The value is a whole number of degrees from 0 to 360. Values above 360 clamp to 360. A negative or decimal value falls back to the default of 180 and is left out of the X-Imgix-Params response header.

The default, txt-gradient-angle=180
sandbox-demo
txt-gradient-angle=0 runs bottom to top
sandbox-demo
txt-gradient-angle=90 runs left to right
sandbox-demo
txt-gradient-angle=135 runs diagonally
sandbox-demo

Angles changed on October 13, 2026

Between October 2 and October 13, 2026, 0 meant left to right and was the default, and 90 meant top to bottom. Angles now follow the CSS convention described above, and the default is 180. Every existing txt-gradient URL changes direction. To keep the old look, add 90 to the old angle; for old angles above 270, subtract 270 instead. A URL with no angle was left to right and is now top to bottom. Cached copies keep the old direction until they expire. The Video API changed on the same day, so image and video URLs stay in step.

The parameter works per layer, so a URL can set txt-gradient-angle[1] for a second text layer.