Methods
Fills the capsule interior with a color, gradient, or other style.
Draws the capsule outline. Pass a Style for a 1-point stroke, or a StrokeOptions object (
{ style: Style, lineWidth?: number }) for custom width.Support
Usage
Basic capsule
Stroked capsule
Pill-shaped button background
Tag or badge
Notes
- When the frame is square, Capsule renders as a circle. Use Circle directly if a circle is always intended.
- For a rounded rectangle with a specific corner radius, use RoundedRectangle instead.
See Also
- RoundedRectangle — rounded rectangle with custom corner radius
- Circle — circle shape
- Rectangle — rectangle shape