Chart
Beautiful charts built with LayerChart. Copy and paste into your apps.
Area Chart
Showing total visitors for the last 6 months
Trending up by 5.2% this month
January - June 2026
Charts are built with LayerChart — lily only ships the themed Chart.Container and Chart.Tooltip wrappers plus a 5-color palette, so any LayerChart
chart works.
Installation
Installs the style saved in lily.json. For a new Diamond project,
run lily-svelte init --style diamond first.
Install the lily base and `utils` (run once per project).
npx lily-svelte@latest init Install layerchart.
npm i layerchart Copy the chart source from the registry into $lib/components/ui/chart.
Colors
Charts use the --chart-1 … --chart-5 CSS variables — the one sanctioned color surface
in lily's otherwise monochrome system. Override them in your stylesheet to theme every
chart at once:
:root {
--chart-1: #3182f6;
--chart-2: #10b981;
--chart-3: #f59e0b;
--chart-4: #8b5cf6;
--chart-5: #f43f5e;
} Reference them in your chart config with var(--chart-N):
<script lang="ts">
import * as Chart from '$lib/components/ui/chart';
const chartConfig = {
desktop: { label: 'Desktop', color: 'var(--chart-1)' },
mobile: { label: 'Mobile', color: 'var(--chart-2)' }
} satisfies Chart.ChartConfig;
</script> Bar Chart
Bar Chart
January - June 2026
Pie Chart
Pie Chart
January - June 2026