Component Library (UI) is a set of React components with TypeScript leveraging Radix UI primitives. This library roughly follows Atomic Design principles, and are intended to be composed together to build application UI.
This library includes a Storybook as well and is intended for use by the larger DAOhaus community. Since we "dogfood" our own package development we're continually adding to this library as we surface new components.
Our component library includes the following, and each of the components has an associated Story for more deatiled usage.
<Label>
component.<Toast/>
component as it composes other Atoms.useMediaQuery
hook that supports responsive design.theme
and base styles for several components. We have a HausThemeContext
that composes and scaffolds core theme elements.TBD (video walkthrough?)
DAOhaus UI provides a theme Context Provider as well as a set of UI components that can be imported and used to build app UI.Start by importing the HausThemeProvider
from the @daohaus/ui
package at your app's root
component, such as main.tsx
:
Eventually this will support multiple themes that can be passed into the <HausThemeProvider/>
but for now it only includes the default theme. Once this is imported, your app will inherit all of the default theme styles and tokens.
Individual components are exported as named exports from the @daohaus/ui
package. You can use them in your app by importing them into a component:
We have a Storybook with stories for each exported component showcasing the props and variants. All of our components are written with TypeScript so you'll be able to have TypeScript "hints" in your code editor when using them.
👆 this is just a placeholder from Component Library Folder Structure