Bumbag allows you to flexibly build your own components on top of the Bumbag components using a set of composition techniques.
You can pass a component to the
use prop on any Bumbag component. This can be useful when you want to use a different component but still want to preserve the styling.
A common case could be rendering a link as a button:
You can even pass your own components to
You can also use hooks to leverage Bumbag's components. Every Bumbag component comes with a
The first and only parameter to
useProps are the props for the component.
As an alternative to the
useProps hook, every Bumbag component also accepts children as a function (render props).