Toggle Sidebar B
Light & dark mode D

Star

Classic star polygon with straight sides and sharp pointed tips

Classic star polygon with straight sides and sharp pointed tips

Props

PropTypeDefaultDescription
colorcolor#ffffffFill color of the star
centerposition{"x":0.5,"y":0.5}Center position of the star
radiusrange0.4Outer tip radius - distance from center to the pointed tips
sidesrange5Number of points on the star
innerRatiorange0.4Inner vertex radius as a ratio of outer radius (0.382 = golden-ratio 5-star)
rotationrange0Rotation in degrees
softnessrange0Edge softness for antialiasing
strokeThicknessrange0Stroke thickness. Zero means no stroke.
strokeColorcolor#000000Color of the stroke outline
strokePosition"outside" | "center" | "inside"centerPosition of the stroke relative to the shape edge
colorSpace"linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch"linearColor space for blending fill and stroke colors

Usage

vue
<Shader>
  <Star
    color="#ffffff"
    :radius="0.4"
  />
</Shader>