Toggle Sidebar B
Light & dark mode D

Trapezoid

Trapezoid with adjustable top and bottom widths and height

Trapezoid with adjustable top and bottom widths and height

Props

PropTypeDefaultDescription
colorcolor#ffffffFill color of the trapezoid
centerposition{"x":0.5,"y":0.5}Center position of the trapezoid
bottomWidthrange0.35Half-width of the bottom edge
topWidthrange0.2Half-width of the top edge
heightrange0.25Half-height of the trapezoid
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>
  <Trapezoid
    color="#ffffff"
  />
</Shader>