2.0 alpha
These docs describe 2.0. Install it with @once-ui-system/core@alpha.
On 1.8.x? Read the 1.x docs
TrademarkTrademarkDocs
Ctrl k
Search docs...
Contexts

DataThemeProvider

Updated: July 27, 2026
View on GitHub
The DataThemeProvider is a context provider that allows you to override the default app-level data-viz styles configuration. Wrap your app with DataThemeProvider and pass the style configuration as props. You can create a single source of truth for all style configuration in a separate file, for example once-ui.config.js. We also recommend using a Providers component to wrap your app.
Prop
Type
Default
children
React.ReactNode
variant
flatgradientoutline
gradient
mode
categoricaldivergentsequential
categorical
height
number24
axis
{ stroke: string }
tick
{ fill: string; fontSize: number; line: boolean }
useDataTheme() returns the current chart options plus a setter, so a control can change how every chart on the page draws without each chart being rewired. It throws outside a DataThemeProvider. setChartOptions takes a partial: anything you leave out keeps its current value.
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club