> ## 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.

# Trapezoid

> API reference for the Recharts Trapezoid component

Renders a trapezoid shape with support for animation.

A trapezoid is a four-sided polygon with two parallel sides of different lengths. This component is commonly used in funnel charts.

## Props

### Positioning

<ParamField path="x" type="number" default="0">
  The x-coordinate of top left point of the trapezoid in pixels.
</ParamField>

<ParamField path="y" type="number" default="0">
  The y-coordinate of top left point of the trapezoid in pixels.
</ParamField>

### Size

<ParamField path="upperWidth" type="number" default="0">
  Width of the upper horizontal side of the trapezoid in pixels.
</ParamField>

<ParamField path="lowerWidth" type="number" default="0">
  Width of the lower horizontal side of the trapezoid in pixels.
</ParamField>

<ParamField path="height" type="number" default="0">
  Height of the trapezoid in pixels.
</ParamField>

### Appearance

<ParamField path="className" type="string">
  CSS class name to apply to the trapezoid element.
</ParamField>

### Animation

<ParamField path="isUpdateAnimationActive" type="boolean" default="false">
  If set to true, trapezoid will update and render with a gradual fade-in animation from left to right.
</ParamField>

<ParamField path="animationBegin" type="number" default="0">
  Delay in milliseconds before animation begins.
</ParamField>

<ParamField path="animationDuration" type="number" default="1500">
  Duration of animation in milliseconds.
</ParamField>

<ParamField path="animationEasing" type="string" default="ease">
  Easing function for the animation.
</ParamField>

### SVG properties

This component accepts all standard SVG path element properties including:

* `fill` - Fill color
* `stroke` - Stroke color
* `strokeWidth` - Stroke width
* `opacity` - Opacity value
* `style` - Inline styles

### Events

<ParamField path="onClick" type="(e: React.MouseEvent<SVGPathElement>) => void">
  Event handler for click events on the trapezoid.
</ParamField>

<ParamField path="onMouseDown" type="(e: React.MouseEvent<SVGPathElement>) => void">
  Event handler for mousedown events on the trapezoid.
</ParamField>

<ParamField path="onMouseUp" type="(e: React.MouseEvent<SVGPathElement>) => void">
  Event handler for mouseup events on the trapezoid.
</ParamField>

<ParamField path="onMouseMove" type="(e: React.MouseEvent<SVGPathElement>) => void">
  Event handler for mousemove events on the trapezoid.
</ParamField>

<ParamField path="onMouseOver" type="(e: React.MouseEvent<SVGPathElement>) => void">
  Event handler for mouseover events on the trapezoid.
</ParamField>

<ParamField path="onMouseOut" type="(e: React.MouseEvent<SVGPathElement>) => void">
  Event handler for mouseout events on the trapezoid.
</ParamField>

<ParamField path="onMouseEnter" type="(e: React.MouseEvent<SVGPathElement>) => void">
  Event handler for mouseenter events on the trapezoid.
</ParamField>

<ParamField path="onMouseLeave" type="(e: React.MouseEvent<SVGPathElement>) => void">
  Event handler for mouseleave events on the trapezoid.
</ParamField>

## Examples

### Basic trapezoid

```tsx theme={null}
import { Trapezoid } from 'recharts';

<Trapezoid
  x={50}
  y={50}
  upperWidth={100}
  lowerWidth={60}
  height={80}
  fill="#8884d8"
/>
```

### Inverted trapezoid

```tsx theme={null}
import { Trapezoid } from 'recharts';

<Trapezoid
  x={50}
  y={50}
  upperWidth={60}
  lowerWidth={100}
  height={80}
  fill="#82ca9d"
/>
```

### With animation

```tsx theme={null}
import { Trapezoid } from 'recharts';

<Trapezoid
  x={50}
  y={50}
  upperWidth={100}
  lowerWidth={60}
  height={80}
  fill="#ffc658"
  isUpdateAnimationActive={true}
  animationDuration={1000}
  animationEasing="ease-out"
/>
```
