Star
Classic star polygon with straight sides and sharp pointed tips
Props
Prop
Details
colorstringDefault:
#ffffffFill color of the star
colorstringDefault: #ffffffFill color of the star
center{x: number, y: number}Default:
{"x":0.5,"y":0.5}Center position of the star
center{x: number, y: number}Default: {"x":0.5,"y":0.5}Center position of the star
radiusnumberDefault:
0.4Outer tip radius — distance from center to the pointed tips
radiusnumberDefault: 0.4Outer tip radius — distance from center to the pointed tips
sidesnumberDefault:
5Number of points on the star
sidesnumberDefault: 5Number of points on the star
innerRationumberDefault:
0.4Inner vertex radius as a ratio of outer radius (0.382 = golden-ratio 5-star)
innerRationumberDefault: 0.4Inner vertex radius as a ratio of outer radius (0.382 = golden-ratio 5-star)
rotationnumberDefault:
0Rotation in degrees
rotationnumberDefault: 0Rotation in degrees
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>
<Star
color="#ffffff"
:radius="0.4"
/>
</Shader>