๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข๐ŸŽฏ Nexus teaches Next.js from foundations to professional systemsโ€ขโšก App Router, React 19, and Tailwind v4 in one learning pathโ€ข๐Ÿงฉ Inspect real components, layouts, and reusable patternsโ€ข๐Ÿ› ๏ธ Build production discipline, not just polished demosโ€ข๐Ÿ“š Tracks, references, and design studies in one placeโ€ข
UI

LineChart

Smooth responsive line charts with multi-series, dashed lines, and dot control.

Preview

Installation

npm install recharts

Usage

import { LineChart } from '@/components/ui/LineChart'
const data = [
{ week: 'W1', pageViews: 12000, sessions: 4200 },
{ week: 'W2', pageViews: 15400, sessions: 5100 },
// ...
]
export default function Page() {
return (
<LineChart
data={data}
xAxisKey="week"
series={[
{ dataKey: 'pageViews', name: 'Page Views', color: '#F45A5A' },
{ dataKey: 'sessions', name: 'Sessions', color: '#6366f1' },
]}
/>
)
}

Variants

Dashed Line

No Dots / Linear

Prompt Preview

Copy a prompt that recreates this UI

Paste this into your AI coding assistant to generate code that closely matches the reference, including color, size, shape, typography, spacing, and polish.

Copy-ready AI prompt

Starts from the current visual reference and project constraints.

Tweak only product-specific copy or data after the first generation pass.

Props

PropTypeDefaultDescription
data*LineChartDataPoint[]-Array of data objects
series*LineChartSeries[]-Series definitions (dataKey, name, color, dashed, dot)
xAxisKey*string-Key in data for X axis labels
heightnumber300Chart height in pixels
showGridbooleantrueShow background grid lines
showLegendbooleantrueShow series legend
showTooltipbooleantrueShow hover tooltip
smoothbooleantrueUse curved (monotone) line interpolation
classNamestring-Extra CSS classes for the wrapper
โ† Back to UI Components