Daub daub-ui
install
source · Clone the upstream repo
git clone https://github.com/sliday/daub
Claude Code · Install into ~/.claude/skills/
git clone --depth=1 https://github.com/sliday/daub ~/.claude/skills/sliday-daub-daub-ui
manifest:
SKILL.mdsource content
DAUB UI — Component Library
DAUB is a drop-in CSS + JS library with 73 considered components and 20 theme families (40 variants). Thoughtfully composed, no ceremony required.
npm:
daub-ui | CDN: cdn.jsdelivr.net/npm/daub-ui@latest/daub.css
Machine-readable component reference: https://daub.dev/components.json
TypeScript declarations: https://daub.dev/daub.d.ts
Include (CDN)
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/daub-ui@latest/daub.css"> <script src="https://cdn.jsdelivr.net/npm/daub-ui@latest/daub.js"></script>
Alternative CDN:
<link rel="stylesheet" href="https://unpkg.com/daub-ui@latest/daub.css"> <script src="https://unpkg.com/daub-ui@latest/daub.js"></script>
npm install:
npm install daub-ui
Optional fonts (falls back gracefully):
<link href="https://fonts.googleapis.com/css2?family=Fraunces:wght@300..900&family=Source+Serif+4:wght@300..900&family=Cabin:wght@400;500;600;700&display=swap" rel="stylesheet">
Class Convention
All classes:
db- prefix. All CSS variables: --db- prefix.
Themes
Set:
<html data-theme="dark">
Family API: DAUB.setFamily('ink') / DAUB.setScheme('dark') / DAUB.getFamily()
Direct API: DAUB.setTheme('dark') / DAUB.cycleTheme() / DAUB.getTheme()
Accent: DAUB.setAccent('#6B7C3E') / DAUB.resetAccent()
Families (20): default, grunge, solarized, ink, ember, bone, dracula, nord, one-dark, monokai, gruvbox, night-owl, github, catppuccin, tokyo-night, material, synthwave, shades-of-purple, ayu, horizon (each with light + dark)
Categories: originals, classics, modern, trending
Category API: DAUB.THEME_CATEGORIES, DAUB.getCategory('dracula')
Components Quick Reference
Foundations
- Surface:
/db-surface--raised
/--inset--pressed - Typography:
–db-h1
,db-h4
,db-body
,db-labeldb-caption - Prose:
/db-prose
/--sm
/--lg
/--xl--2xl - Elevation:
/db-elevation-1
/-2-3 - Separator:
/db-separator
/--vertical
/--dashed__label - Stack: flexbox layout —
,direction
,gap
,justify
,align
,wrapcontainer - Grid: CSS grid layout —
(2-6),columns
,gap
,align
; classes:container
throughdb-grid--2
,--6db-gap-3 - Responsive:
,db-hide-mobile
,db-show-mobile
,db-hide-tablet
,db-show-tablet
,db-hide-desktopdb-show-desktop - Utilities:
,db-sr-only
,db-text-muteddb-rounded-*
Controls
- Button:
/db-btn db-btn--primary
/--secondary
/--ghost
/--sm
/--lg
/--icon--loading - Icon Button Colors:
/db-btn--icon-danger
/--icon-success--icon-accent - Button Group:
— groups buttons with connected bordersdb-btn-group - Field:
>db-field
+db-field__label
+db-field__inputdb-field__helper - Input:
/db-input
/--sm
/--lg
(standalone)--error - Input Group:
>db-input-group
+__addon
+db-inputdb-btn - Input Icon:
>db-input-icon
+db-input-icon__icon
/db-input--right - Search:
>db-search
+db-search__icon
+db-inputdb-search__clear - Textarea:
/db-textarea
(standalone)--error - Checkbox:
>db-checkbox
+db-checkbox__inputdb-checkbox__box - Radio:
>db-radio-group
>db-radio
+db-radio__inputdb-radio__circle - Switch:
(role="switch", JS-managed)db-switch - Slider:
>db-slider
+db-slider__inputdb-slider__value - Toggle:
/db-toggle
(aria-pressed)--sm - Toggle Group:
— single/multi selectdb-toggle-group - Native Select:
>db-selectdb-select__input - Custom Select:
— search, selection, comboboxdb-custom-select - Kbd:
/db-kbd--sm - Label:
/db-label
/--required--optional - Spinner:
/db-spinner
/--sm
/--lg--xl - Input OTP:
>db-otp
+db-otp__inputdb-otp__separator
Navigation
- Tabs:
>db-tabs
>db-tabs__list
+db-tabs__tabdb-tabs__panel - Breadcrumbs:
> ol > li > adb-breadcrumbs - Pagination:
>db-paginationdb-pagination__btn - Stepper:
>db-stepperdb-stepper__step--completed/--active/--pending - Nav Menu:
>db-nav-menu
/db-nav-menu__item--active - Navbar:
>db-navbar
+__brand
+__nav
+__spacer
+__actions
(sticky, mobile hamburger)__toggle - Menubar:
>db-menubar
+db-menubar__itemdb-menubar__dropdown - Sidebar:
>db-sidebar
>db-sidebar__section
/db-sidebar__item
/--active
/--collapsed__toggle - Bottom Nav:
>db-bottom-nav
/db-bottom-nav__item
/--active
/__badge--always
Data Display
- Card:
>db-card
+db-card__header
+db-card__title
/db-card__footer
(edge-to-edge images)--media - Table:
(sortable withdb-table
on th)data-db-sort - Data Table:
— sortable, selectable rowsdb-data-table - List:
>db-list
>db-list__item
+db-list__titledb-list__secondary - Badge:
/db-badge
/--new
/--updated
/--warning--error - Chip:
/db-chip
/--red
/--green
/--blue
/--purple
/--amber
/--pink
/--active
/__closedata-db-chip-toggle - Avatar:
(sm=32px, md=40px, lg=56px)db-avatar db-avatar--md - Avatar Group:
>db-avatar-group
+db-avatar
(overlapping stack)db-avatar-group__overflow - Calendar:
— day selection, today highlightdb-calendar - Chart:
— CSS-only bar chartdb-chart - Carousel:
>db-carousel
+__track
+__slide__dots - Aspect Ratio:
/db-aspect
/--16-9
/--4-3
/--1-1--21-9 - Scroll Area:
/db-scroll-area
/--horizontal--vertical
Feedback
- Toast:
orDAUB.toast('Quick message')DAUB.toast({ type: 'success', title: 'Done', message: '...' }) - Alert:
>db-alert db-alert--warning
+db-alert__icondb-alert__content - Progress:
>db-progress
style="--db-progress: 65%"db-progress__bar - Skeleton:
/db-skeleton--text
/--heading
/--avatar--btn - Empty State:
>db-empty
+db-empty__icon
+db-empty__titledb-empty__message - Tooltip:
/db-tooltip
/--top
/--bottom
/--left--right
Overlays (always use JS API — handles backdrop, focus trap, scroll lock)
- Modal:
JS:db-modal-overlay#id[aria-hidden] > db-modal > __header + __body + __footer
/DAUB.openModal('id')
/DAUB.closeModal('id')data-db-modal-trigger="id" - Alert Dialog:
JS:db-alert-dialog#id > __overlay + __panel > __title + __desc + __actions
/DAUB.openAlertDialog('id')
auto-closesdata-action="cancel" - Sheet:
JS:db-sheet.db-sheet--right#id > __overlay + __panel > __header + __body
— modifiers:DAUB.openSheet('id')
/--right
/--left
/--top--bottom - Drawer:
JS:db-drawer#id > __overlay + __panel > __handle + __body
— mobile-friendly bottom panelDAUB.openDrawer('id') - Command Palette:
JS:db-command#id > __overlay + __panel > __input-wrap + __list
— Ctrl+K / Cmd+K shortcutDAUB.openCommand('id') - Dropdown Menu:
JS auto-initializes click toggle.db-dropdown > __trigger + __content > __item + __separator + __label
for right-aligned.__content--right
is an alias for__menu
.__content - Context Menu:
— right-click,db-context-menudata-context-menu - Popover:
/db-popover
/--top
/--bottom
/--left--right - Hover Card:
— CSS hover triggerdb-hover-card
Layout & Utility
- Accordion:
— single/multi mode viadb-accordiondata-multi - Collapsible:
— progressive disclosuredb-collapsible - Resizable:
>db-resizable
/__handle--right
/--bottom--corner - Date Picker:
— wraps Calendar in popoverdb-date-picker - Theme Switcher:
— toggle button + categorized popover with 20 families + scheme rowdb-theme-switcher
Dashboard Primitives
- Stat Card:
>db-stat
+db-stat__label
+db-stat__value
/db-stat__trend
/--up--down - Chart Card:
>db-chart-card
+db-chart-card__headerdb-chart-card__body - Table Utilities:
,db-table--compact
,db-table--hover
,db-td--numberdb-td--actions
JS Helpers
- getColor:
— returns current theme's CSS variable value as hexDAUB.getColor('primary') - Theme Events:
document.addEventListener('daub:theme-change', e => e.detail.theme)
Notes
- Field inputs:
goes on the wrapper element (not justdb-field__input
) — applies to input, textarea, select wrappers, or custom control elements.<input> - Icons: DAUB pairs well with Lucide icons (
). All demos use Lucide.<script src="https://unpkg.com/lucide@latest"></script> - Overlay BEM: Overlay components use hyphenated block names (e.g.
,db-modal-overlay
) withdb-alert-dialog
children (e.g.__
,__panel
). The outer wrapper gets the__body
andid
attributes that JS targets.aria-hidden
MCP Server
DAUB has a remote MCP server — if it's connected, use the tools instead of manually building HTML.
Setup (one-time):
claude mcp add daub --transport http https://daub.dev/api/mcp
Tools available:
| Tool | When to use |
|---|---|
| Generate a full DAUB spec from a natural language prompt. Returns a JSON spec with components, props, layout, and theme. |
| Look up available components, their props, valid themes, and the spec format. Use before hand-building specs. |
| Check a spec for broken references, unknown types, missing children. Run after editing specs manually. |
| Get a playground preview URL for any spec. |
Workflow with MCP:
- Call
with a prompt like "Admin dashboard with sidebar, stat cards, and data table. Dracula theme."generate_ui - The tool returns a flat JSON spec — iterate by calling
again withgenerate_ui
+ modification instructionsexisting_spec - Call
to verify the spec is cleanvalidate_spec - Call
to get a preview URLrender_spec
Without MCP (fallback): Build HTML manually using the component classes documented above, or point the LLM at
https://daub.dev/llms.txt.
Full Docs
For complete HTML examples:
https://daub.dev/llms.txt
For json-render (Vercel Generative UI) integration: see the catalog+registry recipe in llms.txt.