Card title
Cards group related content and actions.
Every PoppyUI component, live. Copy the markup; there is no JavaScript to wire up.
A native <dialog> opened with Invoker Commands. Esc and outside click close it.
<button class="btn" commandfor="demo-modal" command="show-modal">
Open modal
</button>
<dialog id="demo-modal" class="modal" closedby="any">
<h2 class="modal-title">Delete project?</h2>
<p>This cannot be undone.</p>
<div class="modal-actions">
<button class="btn btn-ghost" commandfor="demo-modal" command="close">Cancel</button>
<button class="btn btn-danger" commandfor="demo-modal" command="close">Delete</button>
</div>
</dialog>A popover menu placed with CSS anchor positioning.
<button class="btn" popovertarget="demo-menu">Options ▾</button>
<div id="demo-menu" class="dropdown" popover>
<ul class="dropdown-menu">
<li><button>Edit</button></li>
<li><button>Duplicate</button></li>
<li><button>Archive</button></li>
</ul>
</div>.alert with a status color; use role="alert" only for urgent messages.
<div class="alert alert-info" role="status">
<div>
<p class="alert-title">Heads up</p>
<p>A new version is available.</p>
</div>
</div>
<div class="alert alert-danger" role="alert">
<p>Payment failed.</p>
</div>Heads up
A new version is available.
Payment failed.
.avatar for initials or images, with size, shape, status and group modifiers.
<span class="avatar avatar-online" role="img" aria-label="Ada, online">AL</span>
<span class="avatar avatar-square avatar-lg" role="img" aria-label="Grace Hopper">GH</span>
<div class="avatar-group">
<span class="avatar avatar-sm" role="img" aria-label="Ada">A</span>
<span class="avatar avatar-sm" role="img" aria-label="Bob">B</span>
<span class="avatar avatar-sm" role="img" aria-label="Cy">C</span>
</div>.badge pills in solid, soft and outline styles.
<span class="badge">Default</span>
<span class="badge badge-primary">Primary</span>
<span class="badge badge-success badge-soft">Soft</span>
<span class="badge badge-danger badge-outline">Outline</span>
<span class="badge badge-info badge-sm">Small</span>
<span class="badge badge-warning badge-lg">Large</span>.card container with body, title and actions.
<article class="card card-bordered">
<div class="card-body">
<h3 class="card-title">Card title</h3>
<p>Cards group related content and actions.</p>
<div class="card-actions">
<button type="button" class="btn btn-primary btn-sm">Open</button>
</div>
</div>
</article>Cards group related content and actions.
.divider separates content, with optional centered text.
<p>Above</p>
<div class="divider" role="separator">OR</div>
<p>Below</p>
<hr class="divider" />Above
Below
.kbd key caps for shortcuts.
<kbd class="kbd kbd-sm">Ctrl</kbd> + <kbd class="kbd">K</kbd>
<kbd class="kbd kbd-lg">Esc</kbd>.loading spinners that inherit the text color.
<span class="loading" role="status">Loading</span>
<span class="loading loading-dots" role="status">Loading</span>
<span class="loading loading-lg" role="status">Loading</span>Native <progress> styled with .progress; no value means indeterminate.
<progress class="progress" value="40" max="100" aria-label="Upload"></progress>
<progress class="progress progress-success" value="75" max="100" aria-label="Done"></progress>
<progress class="progress progress-info" aria-label="Loading"></progress>.skeleton shimmer placeholders, hidden from assistive tech.
<div aria-busy="true">
<div class="skeleton skeleton-circle" aria-hidden="true"></div>
<div class="skeleton skeleton-text" aria-hidden="true"></div>
<div class="skeleton" aria-hidden="true" style="block-size: 4rem"></div>
</div>.stats groups of .stat figures that wrap on narrow screens.
<div class="stats">
<div class="stat">
<div class="stat-title">Revenue</div>
<div class="stat-value">$12k</div>
<div class="stat-desc">+8% this month</div>
</div>
<div class="stat">
<div class="stat-title">Users</div>
<div class="stat-value">4,210</div>
<div class="stat-desc">+120 this week</div>
</div>
</div>.table with zebra and hover options, scrollable inside .table-wrap.
<div class="table-wrap" role="region" aria-label="Users" tabindex="0">
<table class="table table-zebra table-hover">
<thead>
<tr><th scope="col">Name</th><th scope="col">Role</th></tr>
</thead>
<tbody>
<tr><td>Ada</td><td>Engineer</td></tr>
<tr><td>Grace</td><td>Admiral</td></tr>
<tr><td>Linus</td><td>Maintainer</td></tr>
</tbody>
</table>
</div>| Name | Role |
|---|---|
| Ada | Engineer |
| Grace | Admiral |
| Linus | Maintainer |
CSS-only .tooltip from data-tip; also set aria-label on the trigger.
<span class="tooltip" data-tip="Save changes">
<button type="button" class="btn" aria-label="Save changes">Save</button>
</span>
<span class="tooltip tooltip-bottom" data-tip="Below">
<button type="button" class="btn" aria-label="Bottom">Bottom</button>
</span>.input, .textarea and .select share colors, sizes and a :user-invalid border.
<input class="input" type="text" aria-label="Name" placeholder="Name">
<input class="input input-primary input-sm" aria-label="Small" placeholder="Small">
<input class="input input-lg" aria-label="Large" placeholder="Large">
<input class="input input-ghost" aria-label="Ghost" placeholder="Ghost">
<input class="input" aria-label="Disabled" value="Disabled" disabled>
<textarea class="textarea" aria-label="Message"></textarea>
<select class="select" aria-label="Fruit">
<option>Apple</option>
<option>Banana</option>
</select>.checkbox on a native checkbox, with an indeterminate state.
<label class="label-inline">
<input type="checkbox" class="checkbox" checked> Default
</label>
<label class="label-inline">
<input type="checkbox" class="checkbox checkbox-success"> Success
</label>
<label class="label-inline">
<input type="checkbox" class="checkbox checkbox-lg"> Large
</label>
<label class="label-inline">
<input type="checkbox" class="checkbox" disabled> Disabled
</label>.radio on a native radio; arrow keys move between options in a group.
<label class="label-inline">
<input type="radio" name="plan" class="radio" checked> Free
</label>
<label class="label-inline">
<input type="radio" name="plan" class="radio radio-secondary"> Pro
</label>
<label class="label-inline">
<input type="radio" name="plan" class="radio" disabled> Team
</label>.toggle is a checkbox with role="switch".
<label class="label-inline">
<input type="checkbox" role="switch" class="toggle" checked> Wi-Fi
</label>
<label class="label-inline">
<input type="checkbox" role="switch" class="toggle toggle-success toggle-lg"> Sync
</label>
<label class="label-inline">
<input type="checkbox" role="switch" class="toggle" disabled> Offline
</label>.range restyles the native slider track and thumb.
<input type="range" class="range" aria-label="Volume" value="40">
<input type="range" class="range range-secondary range-sm" aria-label="Brightness" value="70">
<input type="range" class="range range-danger range-lg" aria-label="Heat" value="20">.field, .fieldset and .label-inline lay out forms; .field-error appears on :user-invalid.
<form>
<fieldset class="fieldset">
<legend class="fieldset-legend">Sign up</legend>
<div class="field">
<label class="field-label" for="field-email">Email</label>
<input class="input" id="field-email" type="email" required
aria-describedby="field-email-hint field-email-error">
<p class="field-hint" id="field-email-hint">We never share it.</p>
<p class="field-error" id="field-email-error">Enter a valid email.</p>
</div>
<label class="label-inline">
<input type="checkbox" class="checkbox" required> I accept the terms
</label>
</fieldset>
</form>Native <details name>; items sharing a name are exclusive.
<div class="accordion">
<details class="accordion-item" name="faq" open>
<summary>What is PoppyUI?</summary>
<div class="accordion-content">A CSS-first design system.</div>
</details>
<details class="accordion-item" name="faq">
<summary>Does it need JavaScript?</summary>
<div class="accordion-content">No. The name attribute makes items exclusive.</div>
</details>
</div>Radio inputs and sibling selectors; arrow keys work natively.
<div class="tabs">
<input type="radio" name="demo-tabs" id="demo-tab1" class="tab-input" checked>
<label for="demo-tab1" class="tab">One</label>
<div class="tab-panel">First panel</div>
<input type="radio" name="demo-tabs" id="demo-tab2" class="tab-input">
<label for="demo-tab2" class="tab">Two</label>
<div class="tab-panel">Second panel</div>
</div>Numbered progress from CSS counters.
<ol class="steps">
<li class="step step-done">Account</li>
<li class="step" aria-current="step">Profile</li>
<li class="step">Finish</li>
</ol>A side sheet on <dialog>, opened with Invoker Commands.
<button type="button" class="btn" commandfor="demo-drawer" command="show-modal">Open drawer</button>
<dialog id="demo-drawer" class="drawer" aria-label="Navigation" closedby="any">
<button type="button" class="btn btn-ghost btn-sm" commandfor="demo-drawer" command="close">Close</button>
<ul class="menu">
<li class="menu-title">Navigate</li>
<li><a href="#drawer" aria-current="page">Home</a></li>
<li><a href="#drawer">Projects</a></li>
</ul>
</dialog>Groups adjacent controls flush with a shared radius.
<div class="join">
<button type="button" class="btn">One</button>
<button type="button" class="btn">Two</button>
<button type="button" class="btn">Three</button>
</div>A fixed stack for alerts; here a popover="manual" toast with a close button.
<button type="button" class="btn" popovertarget="demo-toast">Show toast</button>
<div id="demo-toast" class="toast" popover="manual" role="status">
<div class="alert alert-success">
Saved
<button type="button" class="btn btn-ghost btn-sm" popovertarget="demo-toast" popovertargetaction="hide">Close</button>
</div>
</div>