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={typewriter}>.
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 paper and types its groups in the ribbon’s black and red only:
style.graph({ textScale }) scales its type for a larger or smaller one.
With a geom package
Typewriter repaints the built-in geoms only. A geom from a package, such as the dumbbell, keeps its own shapes and is drawn in the theme’s colors and type.Fonts
fonts.css loads Special Elite from Google Fonts. To host the font yourself, leave the import out and load a family named Special Elite before the first graph is drawn. The face has one weight, and the theme sets every label in it.
