Every component, live demo, interactive playground, and copy-paste code. Modify the controls under each demo and grab the exact HTML you need.
data-dd-theme on your <html> tag. Every component switches instantly — no JS required for the visual change. Or call dd.setTheme('forest') programmatically.<!-- Set on the html element — that's it -->
<html data-dd-theme="light">
<html data-dd-theme="dark">
<html data-dd-theme="midnight">
<html data-dd-theme="forest">
<html data-dd-theme="sand">
<html data-dd-theme="rose">
<html data-dd-theme="slate">
<html data-dd-theme="carbon">
<html data-dd-theme="paper">
<!-- JS API -->
dd.setTheme('forest'); // set any theme
dd.themes; // ['light','dark','midnight',...]
<!-- HTML attribute trigger -->
<button data-dd-set-theme="midnight">Go Midnight</button>
<!-- In <head> --> <link rel="stylesheet" href="https://divdrop.io/CDN/CSS/Def/divdrop.css"> <!-- Before </body> --> <script src="https://divdrop.io/CDN/JS/divdrop.js"></script>
<!DOCTYPE html>
<html lang="en" data-dd-theme="light">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My App</title>
<link rel="stylesheet" href="https://divdrop.io/CDN/CSS/Def/divdrop.css">
</head>
<body>
<header class="dd-header is-sticky dd-header-dark">
<div class="dd-header-inner">
<div class="dd-header-logo">
<a class="dd-logo" href="/">
<img src="https://divdrop.io/logo/divdroplogo.png" alt="DivDrop">
</a>
</div>
<div class="dd-header-nav">
<nav class="dd-nav dd-nav-flat">
<div class="dd-nav-menu">
<a class="dd-nav-link is-active" href="/">Home</a>
<a class="dd-nav-link" href="/docs">Docs</a>
</div>
<div class="dd-nav-actions">
<a class="dd-button dd-button-sm" href="/signup">Get started</a>
</div>
<button class="dd-nav-toggle" data-dd-nav-toggle>
<span></span><span></span><span></span>
</button>
<div class="dd-nav-panel"></div>
</nav>
</div>
</div>
</header>
<main class="dd-container dd-page">
<section class="dd-section"><h1>Hello DivDrop</h1></section>
</main>
<script src="https://divdrop.io/CDN/JS/divdrop.js"></script>
</body>
</html>:root { --dd-brand: #5046e4; }Radius scale
dd-header-dark = black bg. dd-logo-right flips logo. Default header is page grey.<header class="dd-header is-sticky">
<div class="dd-header-inner">
<div class="dd-header-logo">
<a class="dd-logo" href="/">
<img src="https://divdrop.io/logo/divdroplogo.png" alt="DivDrop">
</a>
</div>
<div class="dd-header-nav">
<nav class="dd-nav">
<div class="dd-nav-menu">
<a class="dd-nav-link is-active" href="/">Home</a>
<a class="dd-nav-link" href="/docs">Docs</a>
<a class="dd-nav-link" href="/pricing">Pricing</a>
</div>
<div class="dd-nav-actions">
<a class="dd-button dd-button-sm" href="/signup">Get started</a>
</div>
<button class="dd-nav-toggle" data-dd-nav-toggle>
<span></span><span></span><span></span>
</button>
<div class="dd-nav-panel"></div>
</nav>
</div>
</div>
</header>
Default
Hover to lift.
Dark
High contrast.
Feature
Gradient surface.
<div class="dd-panel">
<div class="dd-panel-head">Header</div>
<div class="dd-panel-body">
<p class="dd-panel-title">Title</p>
<p class="dd-panel-text">Body copy.</p>
</div>
<div class="dd-panel-foot">Footer</div>
</div>
<div class="dd-panel dd-panel-dark">…</div>
<div class="dd-panel dd-panel-feature dd-panel-static">…</div>
<div class="dd-panel dd-panel-side">
<img class="dd-panel-media" src="photo.jpg" alt="">
<div class="dd-panel-body">Content</div>
</div><span class="dd-badge">Badge</span>
<div class="dd-alert">Default</div> <div class="dd-alert dd-alert-success">✓ Success</div> <div class="dd-alert dd-alert-danger">✕ Danger</div> <div class="dd-alert dd-alert-warning">⚠ Warning</div> <div class="dd-alert dd-alert-info">ℹ Info</div>
<div class="dd-avatar dd-avatar-sm">AB</div> <div class="dd-avatar">CD</div> <div class="dd-avatar dd-avatar-lg">EF</div> <div class="dd-avatar dd-avatar-xl"> <img src="photo.jpg" alt="User"> </div> <!-- Group --> <div class="dd-avatar-group"> <div class="dd-avatar">A</div> <div class="dd-avatar">B</div> <div class="dd-avatar dd-avatar-sm">+4</div> </div>
<div class="dd-skeleton dd-skeleton-text"></div> <div class="dd-skeleton dd-skeleton-title"></div> <div class="dd-skeleton dd-skeleton-img"></div> <div class="dd-skeleton dd-skeleton-btn"></div> <div class="dd-skeleton dd-skeleton-avatar"></div> <div class="dd-skeleton dd-skeleton-card"></div> <!-- Custom: add inline width/height --> <div class="dd-skeleton" style="width:80px;height:80px;border-radius:50%"></div>
<div class="dd-divider">or continue with</div> <hr class="dd-divider-line"> <span class="dd-divider-v"></span>
<div class="dd-pagination"> <span class="dd-page-item is-disabled">«</span> <span class="dd-page-item is-active">1</span> <span class="dd-page-item">2</span> <span class="dd-page-item">3</span> <span class="dd-page-item">»</span> </div> <!-- Compact: add dd-pagination-sm -->
<button data-dd-tooltip="Top tooltip">Hover me</button> <button data-dd-tooltip="Bottom" data-dd-tooltip-pos="bottom">…</button> <button data-dd-tooltip="Left" data-dd-tooltip-pos="left">…</button> <button data-dd-tooltip="Right" data-dd-tooltip-pos="right">…</button> <!-- Works on any element. Pure CSS — no JS required. -->
Underline style
Box style
<!-- Underline inputs -->
<div class="dd-form">
<div class="dd-field">
<label class="dd-label">Email</label>
<input class="dd-input" type="email">
<span class="dd-help">Helper text</span>
</div>
<label class="dd-control"><input type="checkbox"> Agree</label>
<button class="dd-button">Submit</button>
</div>
<!-- Box inputs -->
<input class="dd-input-box" type="text">
<select class="dd-select-box">…</select>
<textarea class="dd-textarea-box"></textarea>
<!-- Validation states -->
<input class="dd-input-box is-valid">
<input class="dd-input-box is-invalid">
<span class="dd-field-error">Error message</span>| Component | Category | Status | JS |
|---|---|---|---|
| Panels | Layout | Ready | Reveal |
| Buttons | Action | Ready | Processing |
| Router | JS | New | Yes |
<div class="dd-table-wrap">
<table class="dd-table dd-table-striped dd-table-hover">
<thead><tr><th>Col A</th><th>Col B</th></tr></thead>
<tbody><tr><td>Row</td><td>Cell</td></tr></tbody>
</table>
</div><div class="dd-progress"> <div class="dd-progress-bar" style="--dd-progress:65%"></div> </div> <div class="dd-loader"></div>
<div class="dd-dropdown">
<button data-dd-dropdown-toggle class="dd-button dd-button-sm">Actions ▾</button>
<div class="dd-dropdown-menu">
<div class="dd-dropdown-header">Options</div>
<a class="dd-dropdown-item" href="#">Edit</a>
<a class="dd-dropdown-item" href="#">Duplicate</a>
<div class="dd-dropdown-divider"></div>
<a class="dd-dropdown-item dd-item-danger" href="#">Delete</a>
</div>
</div>
<!-- Right-aligned: add dd-dropdown-right to menu --><button data-dd-modal-open="#myModal">Open</button>
<div id="myModal" class="dd-modal">
<div class="dd-modal-box">
<div class="dd-stack">
<h3>Title</h3>
<p>Content.</p>
<button data-dd-modal-close class="dd-button">Close</button>
</div>
</div>
</div>
<!-- Sizes: dd-modal-sm / dd-modal-lg -->
<!-- Backdrop click + Escape close -->
<!-- Confirm dialog -->
<button data-dd-confirm="Sure?" data-dd-confirm-type="danger">Delete</button><button data-dd-drawer-open="#myDrawer">Open drawer</button> <aside id="myDrawer" class="dd-drawer"> <button data-dd-drawer-close class="dd-button dd-button-sm">Close</button> <a class="dd-sidebar-link is-active" href="#">Dashboard</a> <a class="dd-sidebar-link" href="#">Settings</a> </aside> <!-- Right drawer: add dd-drawer-right --> <!-- Backdrop auto-created by JS. Escape closes. -->
DivDrop CSS controls the visual system: tokens, components, utilities. All prefixed dd-.
DivDrop JS adds reactive behavior: store, binder, router, 26 auto-init modules.
Override any --dd-* CSS custom property to theme the entire system.
<dd-tabs>
<div class="dd-tabs-list">
<button class="dd-tab-trigger" data-dd-tab="one">Tab 1</button>
<button class="dd-tab-trigger" data-dd-tab="two">Tab 2</button>
</div>
<div class="dd-tab-panel" data-dd-tab-panel="one">Content 1</div>
<div class="dd-tab-panel" data-dd-tab-panel="two">Content 2</div>
</dd-tabs>
<!-- data-dd-tab must match data-dd-tab-panel -->:root { --dd-brand: #5046e4; }<!-- data-dd-accordion-single: only one open at a time -->
<div class="dd-stack dd-stack-sm" data-dd-accordion-single>
<div class="dd-accordion-item is-open"> <!-- is-open = expanded by default -->
<button class="dd-accordion-trigger">Question?</button>
<div class="dd-accordion-panel">Answer.</div>
</div>
<div class="dd-accordion-item">
<button class="dd-accordion-trigger">Another?</button>
<div class="dd-accordion-panel">Answer.</div>
</div>
</div>window.dd_DEV = true before the script to enable console warnings for missing keys, unregistered actions, and broken selectors.window.dd // main global
window.DivDrop // alias
dd.store(initial) // reactive store factory
dd.binder(store) // DOM binder → .mount()
dd.action(name, fn) // register named action
dd.dispatch(name, data) // fire named action
dd.on(event, fn) // event bus subscribe
dd.off(event, fn) // unsubscribe
dd.emit(event, data) // event bus emit
dd.router(routes) // hash router
dd.navigate('/path') // programmatic navigation
dd.toast(opts) // show toast
dd.setBellCount(n) // update nav bell badge
dd.globalStore(initial) // single-page store (auto-mounts binder)<dd-reveal effect="fade">…</dd-reveal> <dd-reveal effect="fly-left">…</dd-reveal> <dd-reveal effect="fly-right">…</dd-reveal> <dd-reveal effect="zoom">…</dd-reveal> <dd-reveal effect="blur">…</dd-reveal> <!-- Stagger with CSS variable delay --> <dd-reveal effect="fly-left" style="--dd-reveal-delay:100ms">…</dd-reveal> <dd-reveal effect="fly-left" style="--dd-reveal-delay:200ms">…</dd-reveal> <!-- Attribute syntax --> <div data-dd-reveal="zoom">…</div>
<!-- Single phrase -->
<h1><dd-typewriter speed="40">Your headline.</dd-typewriter></h1>
<!-- Multi-phrase cycling -->
<h1>
<dd-typewriter speed="35"
phrases='["Build fast.","Zero deps.","Ship today."]'>
</dd-typewriter>
</h1>
<!-- speed="40" ms per character -->
<!-- delete-speed="24" ms per deletion -->
<!-- pause="1600" pause after phrase -->
<!-- caret="false" hide cursor -->
<!-- loop="false" type once -->Vertical
Horizontal
<dd-marquee> <div>Item 1</div><div>Item 2</div> </dd-marquee> <dd-marquee direction="horizontal">…</dd-marquee> <!-- Speed: --dd-marquee-speed (default 8000ms) --> <!-- Height: max-height on the element -->
Downloads
Satisfaction
Revenue
JS Modules
<dd-counter to="4200" suffix="+">0</dd-counter> <dd-counter to="99" suffix="%">0</dd-counter> <dd-counter to="14" prefix="$" suffix="k">0</dd-counter> <!-- to="1000" target number --> <!-- prefix="$" text before --> <!-- suffix="%" text after --> <!-- duration="1300" animation ms --> <!-- decimals="2" decimal places -->
<!-- HTML trigger -->
<button data-dd-toast="Message">Toast</button>
<button data-dd-toast="Success!" data-dd-toast-type="success">Toast</button>
<!-- JS programmatic -->
<script>
dd.toast('Simple string', 3000);
dd.toast({
title: 'File uploaded',
message: 'photo.jpg is ready.',
type: 'success',
duration: 4000,
closable: true
});
</script>| Name | Role | Status |
|---|---|---|
<!-- 1. Create store -->
<script>
const store = dd.globalStore({
users: [
{ name: 'Jane Smith', role: 'Designer', status: 'Active' },
]
});
</script>
<!-- 2. Repeat element -->
<ul data-dd-repeat="users">
<template>
<li>
<strong data-dd-key="name"></strong>
<span data-dd-key="role"></span>
</li>
</template>
</ul>
<!-- 3. Update → DOM re-renders automatically -->
<script>
store.update('users', list =>
[...list, { name: 'New', role: 'Guest', status: 'Active' }]
);
</script>
Hello, World!
Dark mode: false
<script>
const store = dd.globalStore({ userName: '', darkMode: false });
store.subscribe('darkMode', isDark => {
document.documentElement.setAttribute(
'data-dd-theme', isDark ? 'dark' : 'light'
);
});
</script>
<!-- Two-way input binding -->
<input data-dd-bind="userName" type="text">
<input data-dd-bind="darkMode" type="checkbox">
<!-- One-way output -->
<span data-dd-output="userName"></span>
<!-- Attribute output -->
<img data-dd-output-attr="src:avatarUrl">
<!-- Conditionals -->
<div data-dd-if="darkMode">Dark is on</div>
<div data-dd-if="userName==Jane">Hello Jane!</div>
<div data-dd-if="userName!=Jane">Not Jane</div>
<!-- Toggle class -->
<div data-dd-class="darkMode:is-dark">…</div>
<script>
dd.router({
'/': () => store.set('page', 'home'),
'/about': () => store.set('page', 'about'),
'/users/:id': ({ id }) => store.set('userId', id),
'*': ({ path }) => store.set('page', '404'),
});
// Navigate programmatically
dd.navigate('/about');
dd.navigate('/users/42');
</script>
<!-- Link navigation (no # prefix needed) -->
<a data-dd-route="/about">About</a>
<a data-dd-route="/users/42">User 42</a>
<!-- Or standard hash links -->
<a href="#/about">About</a>
<!-- Tie to conditional rendering -->
<section data-dd-if="page==home">Home</section>
<section data-dd-if="page==about">About</section>
<!-- Listen to route events -->
<script>
dd.on('dd:route', ({ path, params }) => {
console.log('Route:', path, params);
});
</script>Spacing scale: 1=.25rem · 2=.5rem · 3=1rem · 4=1.5rem · 5=3rem
Display
Flex
Text
Spacing
Visual
Typography
Misc
<!-- Hide at breakpoint --> <div class="dd-hide-sm">Hidden on mobile ≤576px</div> <div class="dd-hide-md">Hidden on tablet ≤768px</div> <div class="dd-hide-lg">Hidden on small desktop ≤1024px</div> <div class="dd-hide-xl">Hidden on large screens >1024px</div> <!-- Show ONLY at breakpoint --> <div class="dd-show-sm">Only on mobile</div> <div class="dd-show-md">Only on tablet</div> <div class="dd-show-lg">Only on small desktop</div> <div class="dd-show-xl">Only on large screens</div>
Opened with data-dd-modal-open="#dm1". Click the backdrop or button to close. Escape key also closes.
Add dd-modal-sm or dd-modal-lg to resize.