Configuration

Apart from Theming, Flora ships another context provider which is used for configuration. It can be used to configure custom rendering logic.

linkComponent

By default, every component accepting a

href
prop will render a respective
<a>
tag. However, many web frameworks, e.g. Next.js
(new tab)
, provide a custom
Link
component that is used for client-side routing. Instead of wrapping every linkable component with that
Link
component, we can configure the
linkComponent
using the
ConfigProvider
.

Constants

A common pattern is to expose some global constants to an app.
That could either be fixed sizes for elements that have a fixed position such as the navigation.
Another common type of constants are z-indices.

Accessing Config

Similar to Theming, Flora exports a hook that will return the current config.