Documentation

Trapezoid

Trapezoid with adjustable top and bottom widths and height

Props

colorstring
Default:#ffffff
Fill color of the trapezoid
center{x: number, y: number}
Default:{"x":0.5,"y":0.5}
Center position of the trapezoid
bottomWidthnumber
Default:0.35
Half-width of the bottom edge
topWidthnumber
Default:0.2
Half-width of the top edge
heightnumber
Default:0.25
Half-height of the trapezoid
rotationnumber
Default:0
Rotation in degrees
softnessnumber
Default:0
Edge softness for antialiasing
strokeThicknessnumber
Default:0
Stroke thickness. Zero means no stroke.
strokeColorstring
Default:#000000
Color of the stroke outline
strokePosition"outside" | "center" | "inside"
Default:center
Position of the stroke relative to the shape edge
colorSpace"linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch"
Default:linear
Color space for blending fill and stroke colors

Usage

<Shader>
  <Trapezoid
    color="#ffffff"
   />
</Shader>