✅ You are viewing documentation for the latest version of Compose SDK.
Version:

# Variable GradientDirections

const GradientDirections: object

Common gradient direction presets for convenience.

# Type declaration

# bottomToTop

readonly bottomToTop: object

Bottom to top gradient

# bottomToTop.x1

readonly x1: 0 = 0

# bottomToTop.x2

readonly x2: 0 = 0

# bottomToTop.y1

readonly y1: 1 = 1

# bottomToTop.y2

readonly y2: 0 = 0


# diagonalTopLeft

readonly diagonalTopLeft: object

Diagonal top-left to bottom-right

# diagonalTopLeft.x1

readonly x1: 0 = 0

# diagonalTopLeft.x2

readonly x2: 1 = 1

# diagonalTopLeft.y1

readonly y1: 0 = 0

# diagonalTopLeft.y2

readonly y2: 1 = 1


# diagonalTopRight

readonly diagonalTopRight: object

Diagonal top-right to bottom-left

# diagonalTopRight.x1

readonly x1: 1 = 1

# diagonalTopRight.x2

readonly x2: 0 = 0

# diagonalTopRight.y1

readonly y1: 0 = 0

# diagonalTopRight.y2

readonly y2: 1 = 1


# leftToRight

readonly leftToRight: object

Left to right gradient

# leftToRight.x1

readonly x1: 0 = 0

# leftToRight.x2

readonly x2: 1 = 1

# leftToRight.y1

readonly y1: 0 = 0

# leftToRight.y2

readonly y2: 0 = 0


# rightToLeft

readonly rightToLeft: object

Right to left gradient

# rightToLeft.x1

readonly x1: 1 = 1

# rightToLeft.x2

readonly x2: 0 = 0

# rightToLeft.y1

readonly y1: 0 = 0

# rightToLeft.y2

readonly y2: 0 = 0


# topToBottom

readonly topToBottom: object

Top to bottom gradient

# topToBottom.x1

readonly x1: 0 = 0

# topToBottom.x2

readonly x2: 0 = 0

# topToBottom.y1

readonly y1: 0 = 0

# topToBottom.y2

readonly y2: 1 = 1