Renders a rectangle element with support for rounded corners and animation. Unlike the standard SVG rect element, this component supports rounded corners and animation. The rectangle is drawn using an SVG path element. This component accepts X and Y coordinates in pixels. If you need to position the rectangle based on your chart’s data, consider using the ReferenceArea component instead.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/recharts/recharts/llms.txt
Use this file to discover all available pages before exploring further.
Props
Positioning
The x-coordinate of top left point of the rectangle in pixels.
The y-coordinate of top left point of the rectangle in pixels.
Width of the rectangle in pixels.
Height of the rectangle in pixels.
Appearance
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.
CSS class name to apply to the rectangle element.
Animation
Whether the initial animation is active.
Whether the update animation is active when props change.
Delay in milliseconds before animation begins.
Duration of animation in milliseconds.
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
Event handler for click events on the rectangle.
Event handler for mousedown events on the rectangle.
Event handler for mouseup events on the rectangle.
Event handler for mousemove events on the rectangle.
Event handler for mouseover events on the rectangle.
Event handler for mouseout events on the rectangle.
Event handler for mouseenter events on the rectangle.
Event handler for mouseleave events on the rectangle.