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={neoBrutalist}>.
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
The shadow
The graph’s own shadow falls outside its frame, to the right and below. Leave room for it around the renderer, or whatever holds the graph cuts it off.Changing the look of one graph
A spec’s ownstyles(), scales and config() sit above the theme. This graph keeps the blocks and draws its groups in pink and black:
style.graph({ textScale }) scales its type for a larger or smaller one.
With a geom package
Neo Brutalist repaints no geom. A geom from a package, such as the dumbbell, is drawn in the theme’s colors and type like a built-in one.Fonts
fonts.css loads Space Grotesk from Google Fonts, in weights 500 and 700. To host the font yourself, leave the import out and load a family named Space Grotesk before the first graph is drawn.
