Skip to content

Chart

ApexCharts wrapper themed from design tokens; loaded on demand.

Installation

bun add @xerobi/ui
import { Chart, ChartLegends, ChartLoading, ChartSelect } from "@xerobi/ui/chart"

This component is client-side. In Astro, hydrate it with a client directive.

API reference

Chart

PropTypeDescription
slotProps{ loading?: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement> | undefined; }

ChartLegends

PropTypeDescription
labelsstring[]
colorsstring[]
valuesstring[]
sublabelsstring[]
iconsReactNode[]
slotProps{ wrapper?: DetailedHTMLProps<LiHTMLAttributes<HTMLLIElement>, HTMLLIElement> | undefined; root?: DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivEl...

ChartLoading

No props of its own.

ChartSelect

PropTypeDescription
options*string[]
value*string
onChange*(newValue: string) => void

Hooks

  • useChart: Default ApexCharts options matching the Minimal look, merged with `updatedOptions`. Colours follow the active brand and light/dark mode.

Search documentation

Search pages, components and blocks.