SwiftUI.js
Components

RadialGradient

RadialGradient fills a view outward from a center point using color stops.

RadialGradient fills a view outward from a center point using color stops.

Examples

Example

Preview unavailable for this example in the static docs build.

Show code
<RadialGradient center="center" endRadius={120} startRadius={0} stops={[
      { color: '#ffd60a', location: 0 },
      { color: '#ff375f', location: 0.55 },
      { color: '#5e5ce6', location: 1 },
    ]} style={{
      borderRadius: '20px',
      height: '220px',
      width: '100%',
    }}></RadialGradient>

API

PropTypeRequiredDescription
centerIUnitPointNoNo description yet.
startRadiusnumber | stringNoNo description yet.
endRadiusnumber | stringYesNo description yet.
stopsIGradientStop[]YesNo description yet.

Inherits additional props from IBaseComponent.

Overview

RadialGradient fills a view outward from a center point using color stops.

SwiftUI Correspondence: Mirrors SwiftUI's RadialGradient with stops, center, startRadius, and endRadius.

On this page