๐ŸงจPre-releaseYou shouldn't use this library-1 min read

ShapeProps API Reference

Prop reference

TitleTypeDefaultDescription
points*number
โ€“

Number of points (3=triangle, 4=square, 5=pentagon, etc.), minimum of 3.

width*number
โ€“

Width of the bounding box

height*number
โ€“

Height of the bounding box

roundednumber
โ€“

Corner rounding radius (0=sharp, higher=smoother, 100=circle)

insetnumber
โ€“

Inset amount (0=none, 0.5=star-like, 1=fully inset)

rotationnumber
โ€“

Rotation angle in degrees

scalenumber
โ€“

Scale factor (1=normal size)

rotationPivotPositionInput
โ€“

Rotation pivot (defaults to shape center incl. position offset)

scalePivotPositionInput
โ€“

Scale pivot (defaults to shape center incl. position offset)

positionPositionInput
โ€“

Position offset (number, "10%", "10% 20%", [10,20], x:10,y:20, etc)

classNamestring
โ€“

Additional CSS classes for the root element

styleCSSProperties
โ€“

Additional inline styles for the root element

* Props marked with an asterisk are required.

CSS target reference

ExportCSS Class TargetDescription
ShapeTargetClassRoot.NPUI-Shape-root

Root of the shape component

Exports are available from /src/components/shapes/euclidean/shape.tsx or from
Made by .