@docubuild-io/design
DocuBuild's design system: the tokens, the Svelte components and the design guidelines every DocuBuild product app is built with. Published for DocuBuild's own apps; see the licence below.
Preview: https://design.docubuild.io
Install
pnpm add @docubuild-io/design bits-ui svelte-sonner
svelte, bits-ui and svelte-sonner are peer dependencies: an app holds exactly one copy of each.
Set up Tailwind
@import 'tailwindcss';
@import 'tw-animate-css';
@plugin '@tailwindcss/forms';
@import '@docubuild-io/design/theme.css';
@source '../../node_modules/@docubuild-io/design/dist/**/*.{svelte,js}';
theme.css carries the tokens as Tailwind theme variables (bg-panel, text-ink, text-body, h-control-md, z-modal …), loads Geist and Geist Mono, and adds the base layer. The @source line lets Tailwind see the classes inside the components.
Use
<script lang="ts">
import {Button} from '@docubuild-io/design/ui/button'
import * as Dialog from '@docubuild-io/design/ui/dialog'
import {StatusTag} from '@docubuild-io/design/patterns/status-tag'
</script>
| Export | Holds |
|---|---|
./theme.css | The default theme for Tailwind v4, with the base layer |
./tokens | The default theme's values as an object (hex colours), for email, canvas and charts |
./ui/<name> | The primitives, on bits-ui |
./patterns/<name> | DocuBuild patterns |
./utils | cn and tv, taught the theme's names |
./guidelines/<file> | The design guidelines, as markdown |
Start with guidelines/README.md.
Licence
UNLICENSED. The source is visible, but no licence to use, copy or modify it is granted. The DocuBuild name and logo are trademarks. The bundled Geist fonts are under the SIL Open Font License.