Tessina UI
ConfiguratorGitHubIntroduction
InstallationUsageTheming
ComponentsAccordionAction SheetAlertAlertDialogArea ChartAspectRatioAvatarBadgeBannerBar ChartBottom NavBreadcrumbButtonButtonGroupCalendarCardCarouselChartChatBubbleCheckboxChipCodeBlockCollapsibleColor PickerComboboxCommandContainerContextMenuDate PickerDividerDrawerDropdown MenuEmptyStateFABFieldFieldsetFile UploadFile Upload 2FlexFormGridHoverCardIconButtonLabelLine ChartLinkMenubarMeterModalNavigation MenuNumberFieldOTP InputPaginationPie ChartPopoverProgressPromptInputRadar ChartRadial ChartRadioRatingScroll AreaSearchSegmentedControlSelectShortcutSidebarSkeletonSliderSpacerSpinnerSplit ButtonStackStatusStepperSurfaceSwitchTableTabsTextareaTime PickerToastToggleButtonToggleGroupToolbarTooltipTop Header DesktopTop Header Mobile
Contributing
Components

Chart

Low-level charting primitives — ChartContainer, ChartTooltip, ChartLegend and a typed ChartConfig — that wrap Recharts v3 with Tessina tokens. Compose them with raw Recharts, or use the ready-made AreaChart / LineChart.

Tessina charts are thin, token-driven primitives wrapped around Recharts v3, with the Recharts composition left fully exposed. Reach for these when you need a chart shape beyond Area or Line; otherwise use those ready-made components.

Playground

Installation

pnpm add @tessinaui/ui recharts

Usage

import {
  ChartContainer,
  ChartTooltip,
  ChartTooltipContent,
  ChartLegend,
  ChartLegendContent,
  type ChartConfig,
} from "@tessinaui/ui";
import { CartesianGrid, Line, LineChart, XAxis } from "recharts";

const config: ChartConfig = {
  desktop: { label: "Desktop", color: "var(--chart-1)" },
  mobile: { label: "Mobile", color: "var(--chart-2)" },
};

<ChartContainer config={config} className="aspect-[2/1]">
  <LineChart data={data} accessibilityLayer>
    <CartesianGrid vertical={false} />
    <XAxis dataKey="month" tickLine={false} axisLine={false} />
    <ChartTooltip content={<ChartTooltipContent />} />
    <Line dataKey="desktop" stroke="var(--color-desktop)" />
    <Line dataKey="mobile" stroke="var(--color-mobile)" />
    <ChartLegend content={<ChartLegendContent />} />
  </LineChart>
</ChartContainer>

ChartContainer reads config and injects each series colour as a --color-<key> CSS variable scoped to the chart, so raw Recharts children reference var(--color-desktop) in stroke / fill / stopColor. Because the underlying --chart-N tokens flip with the .dark class, charts recolour on theme change with no React re-render.

Examples

Default

A single-series area chart composed from ChartContainer and raw Recharts primitives.

Tooltip Indicators

ChartTooltipContent supports three indicator styles — dot, line, and dashed.

Legend

A multi-series chart with a token-styled ChartLegend labelling each series.

Loading

ChartSkeleton renders a shape-aware loading placeholder per chart type.

Empty & Error

ChartMessage covers the empty and error states where there's no plot to show.

Primitives

ExportPurpose
ChartContainerResponsive wrapper; injects --color-<key> vars, token-styles axes/grid/cursor.
ChartConfigTyped map of series key → { label, icon?, color }.
ChartTooltip / ChartTooltipContentRecharts Tooltip + token-styled content (dot | line | dashed).
ChartLegend / ChartLegendContentRecharts Legend + token-styled content.
ChartSkeletonCartesian-silhouette loading placeholder.
ChartMessageEmpty / error placeholder.
useChartAccess the active ChartConfig from a custom child.
useReducedMotionprefers-reduced-motion hook used to gate animation.

Theming

Every colour resolves to a token — series via --chart-1 … --chart-6, and chrome via border (grid/axis), muted-foreground (ticks/legend), and popover (tooltip). Nothing is hardcoded. The six series tokens are brand-led and contrast-checked in both light and dark.

Carousel

Touch-friendly slider with multiple variants — slide, card/3D, fade, and free-scroll. Built on Embla Carousel with autoplay, loop, RTL, and vertical orientation support.

ChatBubble

AI chat message bubbles with role-aware alignment, streaming state, action buttons, and RTL support.

On this page

PlaygroundInstallationUsageExamplesDefaultTooltip IndicatorsLegendLoadingEmpty & ErrorPrimitivesTheming