Black Friday · Save 40% on Intent UI Design licenses with code UI2026.

Area Chart

Loading...

Installation

Add the component with the CLI.

npx shadcn@latest add @intentui/area-chart

Composed components

When you install this component via the CLI, it automatically loads all composed components, so you don’t need to add them individually.

Manual installation

Install the dependencies, then copy the component source into your project.

npm install recharts react-aria-components

Examples

Monotone

Use monotone interpolation to draw a smooth curve between data points.

Loading...

Custom format

Customize the chart’s colors and styles.

Loading...

Custom tooltip

Use a custom tooltip to display labels, units, or icons when users hover over a data point.

Loading...

Custom legend

Use a custom legend to display series labels, icons, or controls.

Loading...

Custom colors

Set series colors in the chart configuration.

Loading...

Controlled

Manage chart state to switch datasets or coordinate with other controls.

Loading...

Component API

AreaChart extends the internal Intent UI <BaseChart> component.

areaPropsPartial<ComponentProps<typeof Area>>
cartesianGridPropsCartesianGridProps
chartPropsOmit<ComponentProps<typeof AreaChartPrimitive>, "data" | "stackOffset">
childrenReact.ReactNode
classNamestring
colorsreadonly (ChartColorKeys | string)[]
Default: DEFAULT_COLORS
configChartConfig
connectNullsboolean
Default: false
containerHeightnumber
Default: 370 desktop / 200 mobile
dataRecord<string, any>[]
Default: []
dataKeystring
displayEdgeLabelsOnlyboolean
Default: false
fillType"gradient" | "solid" | "none"
Default: gradient
hideGridLinesboolean
Default: false
hideXAxisboolean
Default: false
hideYAxisboolean
Default: false
intervalTypeIntervalType
Default: equidistantPreserveStart
layoutChartLayout
Default: horizontal
legendLegendContentType | boolean
Default: true
legendPropsOmit<ComponentProps<typeof LegendPrimitive>, "content" | "ref">
tooltipTooltipContentType<ValueType, NameType> | boolean
Default: true
tooltipPropsBaseChartProps["tooltipProps"]
typeChartType
Default: default
valueFormatter(value: number) => string
Default: (value) => value.toString()
xAxisPropsXAxisPropsPrimitive
yAxisPropsYAxisPrimitiveProps

See the Recharts for the full API reference.

Design