ShapeProps API Reference
Prop reference
| Title | Type | Default | Description |
|---|---|---|---|
| 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 |
| rounded | number | โ | Corner rounding radius (0=sharp, higher=smoother, 100=circle) |
| inset | number | โ | Inset amount (0=none, 0.5=star-like, 1=fully inset) |
| rotation | number | โ | Rotation angle in degrees |
| scale | number | โ | Scale factor (1=normal size) |
| rotationPivot | PositionInput | โ | Rotation pivot (defaults to shape center incl. position offset) |
| scalePivot | PositionInput | โ | Scale pivot (defaults to shape center incl. position offset) |
| position | PositionInput | โ | Position offset (number, "10%", "10% 20%", [10,20], x:10,y:20, etc) |
| className | string | โ | Additional CSS classes for the root element |
| style | CSSProperties | โ | Additional inline styles for the root element |
* Props marked with an asterisk are required.
CSS target reference
| Export | CSS Class Target | Description |
|---|---|---|
| ShapeTargetClassRoot | .NPUI-Shape-root | Root of the shape component |
Exports are available from /src/components/shapes/euclidean/shape.tsx or from