Props
Positioning
number
default:"0"
The x-coordinate of top left point of the rectangle in pixels.
number
default:"0"
The y-coordinate of top left point of the rectangle in pixels.
number
default:"0"
Width of the rectangle in pixels.
number
default:"0"
Height of the rectangle in pixels.
Appearance
number | [number, number, number, number]
default:"0"
The radius of corners.If you provide a single number, it applies to all four corners.
If you provide an array of four numbers, they apply to top-left, top-right, bottom-right, bottom-left corners respectively.See the Rounded bar corners guide for examples.
string
CSS class name to apply to the rectangle element.
Animation
boolean
default:"false"
Whether the initial animation is active.
boolean
default:"false"
Whether the update animation is active when props change.
number
default:"0"
Delay in milliseconds before animation begins.
number
default:"1500"
Duration of animation in milliseconds.
string
default:"ease"
Easing function for the animation. Can be ‘ease’, ‘ease-in’, ‘ease-out’, ‘ease-in-out’, ‘linear’, or a custom easing function.
SVG properties
This component accepts all standard SVG path element properties including:fill- Fill colorstroke- Stroke colorstrokeWidth- Stroke widthopacity- Opacity valuestyle- Inline styles
Events
(e: React.MouseEvent<SVGPathElement>) => void
Event handler for click events on the rectangle.
(e: React.MouseEvent<SVGPathElement>) => void
Event handler for mousedown events on the rectangle.
(e: React.MouseEvent<SVGPathElement>) => void
Event handler for mouseup events on the rectangle.
(e: React.MouseEvent<SVGPathElement>) => void
Event handler for mousemove events on the rectangle.
(e: React.MouseEvent<SVGPathElement>) => void
Event handler for mouseover events on the rectangle.
(e: React.MouseEvent<SVGPathElement>) => void
Event handler for mouseout events on the rectangle.
(e: React.MouseEvent<SVGPathElement>) => void
Event handler for mouseenter events on the rectangle.
(e: React.MouseEvent<SVGPathElement>) => void
Event handler for mouseleave events on the rectangle.