Components

RadialGradient

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

Example

Requires React 18.2+ or 19 and shared styles. See setup.

Example

Loading preview…

Code
'use client';
import { RadialGradient } from '@swiftuijs/ui';
export default function Example() {
    return (<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 reference

PropTypeRequiredDescription
centerIUnitPointNo—
startRadiusnumber | stringNo—
endRadiusnumber | stringYes—
stopsIGradientStop[]Yes—

Inherits additional props from IBaseComponent.