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