Skip to main content
Ellipse(): Shape;

Support

Usage

Basic ellipse

Ellipse()
    .fill(Color("purple"))
    .frame({ width: 150, height: 100 })

Ellipse with stroke

Ellipse()
    .stroke({ style: Color("orange"), lineWidth: 4 })
    .frame({ width: 200, height: 80 })

Filled ellipse with border

ZStack([
    Ellipse()
        .fill(Color("cyan")),
    Ellipse()
        .stroke({ style: Color("navy"), lineWidth: 3 })
])
.frame({ width: 120, height: 180 })

Gradient-filled ellipse

Ellipse()
    .fill(LinearGradient({
        colors: [Color("pink"), Color("purple")],
        startPoint: "topLeading",
        endPoint: "bottomTrailing"
    }))
    .frame({ width: 160, height: 100 })