✅ You are viewing documentation for the latest version of Compose SDK.
Version:
# Function createRadialGradient
createRadialGradient(
center,stops):RadialGradientColor
Helper function to create a radial gradient with common presets.
# Parameters
| Parameter | Type | Description |
|---|---|---|
center | RadialGradientConfig | The gradient center configuration |
stops | readonly GradientStop[] | The color stops |
# Returns
A radial gradient configuration
# Example
const gradient = createRadialGradient(
RadialGradientPresets.center,
[
{ position: 0, color: '#ff0000' },
{ position: 1, color: '#0000ff' }
]
);