Skip to content

@undataforum/preset

Package @undataforum/preset is a Theme UI preset. It

  1. uses @theme-ui/preset-base for defaults,
  2. sets the colors for the Theme UI color scheme,
  3. customizes theme scales,
  4. customizes variants for Theme UI components,
  5. customizes variants for @undataforum/components, and
  6. customizes styles for MDX content.

Defaults

You can lookup the defaults here.

Colors

This preset supports the following colors from the Theme UI color scheme:

KeyDescription
textText color. Should have AAA contrast with background.
backgroundBackground color. Should have AAA contrast with text.
primaryPrimary brand color for links, buttons, etc. Should have at least AA contrast with background.
secondaryA secondary brand color for alternative styling. Should have at least AA contrast with background.

You can customize these colors in your project with the colors key.

Contributing

Work with two terminals. In the first terminal run

yarn workspace @undataforum/preset run watch

and in the second terminal run

yarn workspace docs run dev

The first command watches for changes in the @undataforum/preset workspace and bundles the @undataforum/preset package whenever it detects changes. The second command launches the docs, which use the local @undataforum/preset package as dependency.