Toggle Sidebar B
Light & dark mode D

RoundedRect

Rounded rectangle with adjustable width, height, and corner rounding

Rounded rectangle with adjustable width, height, and corner rounding

Props

PropTypeDefaultDescription
colorcolor#ffffffFill color of the rectangle
centerposition{"x":0.5,"y":0.5}Center position of the rectangle
widthrange0.35Half-width of the rectangle
heightrange0.25Half-height of the rectangle
roundingrange0.05Corner rounding radius - set to min(width, height) for a pill shape
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>
  <RoundedRect
    color="#ffffff"
  />
</Shader>