Parallelogram

Parallelogram with adjustable width, height and skew

Props

  • origin

    Reference edge the center position is measured from (center default). Lets you pin the shape relative to a corner or the canvas centre.

    Type
    string
    Default
    center
  • color

    Fill color of the parallelogram

    Type
    string
    Default
    #ffffff
  • center

    Center position of the parallelogram

    Type
    {x: number, y: number}
    Default
    {"x":0.5,"y":0.5}
  • width

    Half-width of the parallelogram

    Type
    number
    Default
    0.32
  • height

    Half-height of the parallelogram

    Type
    number
    Default
    0.22
  • skew

    Horizontal skew of the top edge

    Type
    number
    Default
    0.15
  • rotation

    Rotation in degrees

    Type
    number
    Default
    0
  • softness

    Edge softness for antialiasing

    Type
    number
    Default
    0
  • strokeThickness

    Stroke thickness. Zero means no stroke.

    Type
    number
    Default
    0
  • strokeColor

    Color of the stroke outline

    Type
    string
    Default
    #000000
  • strokePosition

    Position of the stroke relative to the shape edge

    Type
    "outside" | "center" | "inside"
    Default
    center
  • colorSpace

    Color space for blending fill and stroke colors

    Type
    "linear" | "oklch" | "oklab" | "hsl" | "hsv" | "lch"
    Default
    linear

Usage

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