Install
@graphysdk/react and React 19. Pass the theme to createGraphyKit and import its fonts once:
kit.GraphProvider takes the theme. The spec is written as usual and names no theme:
<GraphProvider theme={botanical}>.
The provider reads the theme once, when it mounts. To switch themes, remount the provider, for example with a React key.
What the theme decides
Changing the look of one graph
A spec’s ownstyles(), scales and config() sit above the theme. This graph keeps the sketchbook and draws its groups in two greens:
style.graph({ textScale }) scales its type for a larger or smaller one.
With a geom package
Theme and plugins go to the same kit. A geom package built from the shared shapes, such as the dumbbell, draws its dots washed inside a sepia outline too, and takes the theme’s colors, type and axes.Fonts
fonts.css loads Kalam for the handwriting and Cormorant Garamond for the italic notes from Google Fonts. To host the fonts yourself, leave the import out and load families named Kalam and Cormorant Garamond before the first graph is drawn.
