The ThemeProvider component defines the overall visual look of your application. It can be customized by passing a minimal set of configuration options.

import {
  TimeSeries,
  Container,
  RelativeTimeRange,
  TimeSeriesGranularity,
  ThemeProvider,
} from "@propeldata/ui-kit";

export default async function TimeSeriesExample() {
  return (
    <Container p="5">
      <ThemeProvider
        accentColor="grass"
        grayColor="olive"
        panelBackground="solid"
        scaling="100%"
        radius="none"
      >
        <TimeSeries
          variant="bar"
          query={{
            metric: { count: { dataPool: { name: "TacoSoft Demo Data" } } },
            timeRange: { relative: RelativeTimeRange.LastNDays, n: 90 },
            granularity: TimeSeriesGranularity.Day,
          }}
        />
      </ThemeProvider>
    </Container>
  );
}

A well-tuned set of defaults is provided to get you started, but don’t be afraid to play with all of the available options to find the right visual style for your application.

Tokens

Tokens provide direct access to theme values and give you the flexibility to build and customize your own themed components.

For all available theme tokens see the source code, or read more about each type of token in the relevant theme pages.