ComponentsShape
Circle
Draw a circular shape.
Example
Requires React 18.2+ or 19 and shared styles. See setup.
Default
Loading preview…
Code
'use client';
import { Circle } from '@swiftuijs/ui';
export default function Example() {
return (<Circle fill="#007AFF" style={{ width: '100px', height: '100px' }}></Circle>);
}With Stroke
Add a stroke to the circle:
Usage and limitations
- Set equal width and height for a predictable circle.
fillis optional; it controls the CSS fill color. - Use optional
stroke/strokeWidthfor a border. Keep size and contrast consistent when used as a badge, avatar or indicator.
More examples
With Stroke
API reference
| Prop | Type | Required | Description |
|---|---|---|---|
fill | string | No | Fill color |
stroke | string | No | Stroke color |
strokeWidth | number | No | Stroke width |
Inherits additional props from IBaseComponent.