9 themes. One attribute.
Set data-jb-theme on your <html> tag and every component updates instantly. Build your own with a single CSS block.
One line changes everything
Every DivDrop component reads from CSS custom properties — --jb-bg, --jb-brand, --jb-text etc. A theme is simply a block of overrides for those properties.
When you set data-jb-theme="forest" on <html>, the browser re-evaluates all those var() calls instantly. No JavaScript required for the visual change.
To build your own theme, copy the token block below, rename it, and adjust the values. Add one attribute to your HTML and it works.
<!-- Built-in: just set the attribute -->
<html data-jb-theme="midnight">
<!-- Custom: add a style block + attribute -->
<style>
[data-jb-theme="mybrand"] {
--jb-bg: #1a1a2e;
--jb-brand: #7c3aed;
--jb-nav-bg: #7c3aed;
--jb-nav-color: #fff;
/* ... other tokens */
}
</style>
<html data-jb-theme="mybrand">
Click Preview to see the page change
What to set in your theme block
These are the tokens that control visual theming. Everything else (radius, spacing, font) stays consistent across themes by default.
[data-jb-theme="mytheme"] {
/* Backgrounds */
--jb-bg: #ffffff; /* Page background */
--jb-surface: #f5f5f5; /* Panel / card surface */
--jb-surface-soft: #efefef; /* Slightly darker surface */
--jb-surface-muted: #e5e5e5; /* Table headers, muted areas */
/* Text */
--jb-text: #000000; /* Primary text */
--jb-text-muted: #333333; /* Secondary text, paragraphs */
--jb-text-faint: #666666; /* Labels, hints, metadata */
/* Brand / accent */
--jb-brand: #000000; /* Buttons, links, active states */
--jb-border: rgba(0,0,0,.15); /* Visible borders */
--jb-border-soft: rgba(0,0,0,.08); /* Subtle borders */
--jb-brand-soft: rgba(0,0,0,.06); /* Soft badge/highlight bg */
/* Header bar */
--jb-header-bg: #000000; /* Header background */
--jb-header-color: #ffffff; /* Header text */
/* Nav pill */
--jb-nav-bg: #000000; /* Nav pill background */
--jb-nav-color: #ffffff; /* Nav pill text */
}
Ready to use a theme?
Add the CDN link, set your theme attribute, and start building with the full component library.