Cross
Plus / cross shape with adjustable arm length, width, and rounding
Plus / cross shape with adjustable arm length, width, and rounding
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| color | color | #ffffff | Fill color of the cross |
| center | position | {"x":0.5,"y":0.5} | Center position of the cross |
| radius | range | 0.35 | Arm half-length - distance from center to the end of each arm |
| thickness | range | 0.08 | Arm half-width - controls how wide each arm is |
| rounding | range | 0 | Corner rounding - rounds the arm ends and concave corners |
| rotation | range | 0 | Rotation in degrees (45° turns a plus into an ×) |
| softness | range | 0 | Edge softness for antialiasing |
| strokeThickness | range | 0 | Stroke thickness. Zero means no stroke. |
| strokeColor | color | #000000 | Color of the stroke outline |
| strokePosition | "outside" | "center" | "inside" | center | Position of the stroke relative to the shape edge |
| colorSpace | "linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch" | linear | Color space for blending fill and stroke colors |
Usage
vue
<Shader>
<Cross
color="#ffffff"
:radius="0.35"
/>
</Shader>