Bootstrap 5 Sticky Notes Board with Hover Effect
A board of tilted sticky notes in soft tinted colours that straighten and lift on hover, with a button to add more.
<section class="wdw-stage">
<div class="container" style="max-width:920px">
<div class="d-flex flex-wrap justify-content-between align-items-end gap-3 mb-4">
<div>
<span class="wdw-eyebrow">Board</span>
<h1 class="wdw-heading h2 mt-1 mb-0">Sticky notes</h1>
</div>
<button type="button" class="btn btn-primary rounded-pill" id="addNote">+ Add note</button>
</div>
<h2 class="visually-hidden">Your notes</h2>
<div class="row g-4" id="noteBoard">
<div class="col-12 col-sm-6 col-lg-4">
<article class="note note--accent" style="--tilt:-1deg">
<div class="d-flex justify-content-between align-items-start gap-2 mb-2">
<h3 class="h6 fw-bold mb-0 note-title" contenteditable="true" spellcheck="false" role="textbox" aria-label="Note title">Ship v2.0</h3>
<span class="badge rounded-pill note-tag">Work</span>
</div>
<p class="note-body mb-0" contenteditable="true" spellcheck="false" role="textbox" aria-multiline="true" aria-label="Note text">Final QA on the checkout flow before Friday's release.</p>
<footer class="note-foot d-flex justify-content-between align-items-center small">
<span>Oct 30</span>
<button type="button" class="note-del" aria-label="Delete note Ship v2.0">×</button>
</footer>
</article>
</div>
<div class="col-12 col-sm-6 col-lg-4">
<article class="note note--plain" style="--tilt:1deg">
<div class="d-flex justify-content-between align-items-start gap-2 mb-2">
<h3 class="h6 fw-bold mb-0 note-title" contenteditable="true" spellcheck="false" role="textbox" aria-label="Note title">Design review</h3>
<span class="badge rounded-pill note-tag">Meeting</span>
</div>
<p class="note-body mb-0" contenteditable="true" spellcheck="false" role="textbox" aria-multiline="true" aria-label="Note text">Walk the team through the new onboarding screens.</p>
<footer class="note-foot d-flex justify-content-between align-items-center small">
<span>Nov 2</span>
<button type="button" class="note-del" aria-label="Delete note Design review">×</button>
</footer>
</article>
</div>
<div class="col-12 col-sm-6 col-lg-4">
<article class="note note--plain" style="--tilt:-1deg">
<div class="d-flex justify-content-between align-items-start gap-2 mb-2">
<h3 class="h6 fw-bold mb-0 note-title" contenteditable="true" spellcheck="false" role="textbox" aria-label="Note title">Fix login bug</h3>
<span class="badge rounded-pill note-tag">Urgent</span>
</div>
<p class="note-body mb-0" contenteditable="true" spellcheck="false" role="textbox" aria-multiline="true" aria-label="Note text">Safari users get logged out after 10 minutes.</p>
<footer class="note-foot d-flex justify-content-between align-items-center small">
<span>Oct 31</span>
<button type="button" class="note-del" aria-label="Delete note Fix login bug">×</button>
</footer>
</article>
</div>
<div class="col-12 col-sm-6 col-lg-4">
<article class="note note--accent" style="--tilt:1deg">
<div class="d-flex justify-content-between align-items-start gap-2 mb-2">
<h3 class="h6 fw-bold mb-0 note-title" contenteditable="true" spellcheck="false" role="textbox" aria-label="Note title">Reading list</h3>
<span class="badge rounded-pill note-tag">Personal</span>
</div>
<p class="note-body mb-0" contenteditable="true" spellcheck="false" role="textbox" aria-multiline="true" aria-label="Note text">Finish the typography book and share notes.</p>
<footer class="note-foot d-flex justify-content-between align-items-center small">
<span>Nov 8</span>
<button type="button" class="note-del" aria-label="Delete note Reading list">×</button>
</footer>
</article>
</div>
<div class="col-12 col-sm-6 col-lg-4">
<article class="note note--plain" style="--tilt:1deg">
<div class="d-flex justify-content-between align-items-start gap-2 mb-2">
<h3 class="h6 fw-bold mb-0 note-title" contenteditable="true" spellcheck="false" role="textbox" aria-label="Note title">Groceries</h3>
<span class="badge rounded-pill note-tag">Home</span>
</div>
<p class="note-body mb-0" contenteditable="true" spellcheck="false" role="textbox" aria-multiline="true" aria-label="Note text">Oat milk, coffee beans, lemons and fresh basil.</p>
<footer class="note-foot d-flex justify-content-between align-items-center small">
<span>Today</span>
<button type="button" class="note-del" aria-label="Delete note Groceries">×</button>
</footer>
</article>
</div>
<div class="col-12 col-sm-6 col-lg-4">
<article class="note note--plain" style="--tilt:-1deg">
<div class="d-flex justify-content-between align-items-start gap-2 mb-2">
<h3 class="h6 fw-bold mb-0 note-title" contenteditable="true" spellcheck="false" role="textbox" aria-label="Note title">Team lunch</h3>
<span class="badge rounded-pill note-tag">Social</span>
</div>
<p class="note-body mb-0" contenteditable="true" spellcheck="false" role="textbox" aria-multiline="true" aria-label="Note text">Book a table for eight on Thursday at 12:30.</p>
<footer class="note-foot d-flex justify-content-between align-items-center small">
<span>Nov 5</span>
<button type="button" class="note-del" aria-label="Delete note Team lunch">×</button>
</footer>
</article>
</div>
</div>
</div>
</section>
/* Web Designer Wall library style — shared base for every Bootstrap 5 snippet.
Indigo accent, Plus Jakarta Sans, soft cards, pill buttons. Works in light and dark. */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");
:root,
[data-bs-theme="light"] {
--wdw-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
--bs-body-font-family: var(--wdw-font);
--bs-primary: #4f46e5;
--bs-primary-rgb: 79, 70, 229;
--bs-primary-text-emphasis: #3730a3;
--bs-primary-bg-subtle: #eef2ff;
--bs-primary-border-subtle: #c7d2fe;
--bs-link-color: #4f46e5;
--bs-link-color-rgb: 79, 70, 229;
--bs-link-hover-color: #4338ca;
--bs-link-hover-color-rgb: 67, 56, 202;
--bs-focus-ring-color: rgba(79, 70, 229, 0.25);
--bs-border-radius: 0.75rem;
--bs-border-radius-lg: 1rem;
--bs-border-radius-xl: 1.25rem;
--wdw-radius-card: 1.25rem;
--wdw-shadow: 0 1px 2px rgba(16, 24, 40, 0.05), 0 16px 40px -16px rgba(16, 24, 40, 0.22);
--wdw-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 4px 12px -4px rgba(16, 24, 40, 0.12);
--wdw-stage: #f5f6fb;
}
[data-bs-theme="dark"] {
--bs-primary: #818cf8;
--bs-primary-rgb: 129, 140, 248;
--bs-primary-text-emphasis: #c7d2fe;
--bs-primary-bg-subtle: rgba(129, 140, 248, 0.14);
--bs-primary-border-subtle: rgba(129, 140, 248, 0.35);
--bs-link-color: #a5b4fc;
--bs-link-color-rgb: 165, 180, 252;
--bs-link-hover-color: #c7d2fe;
--bs-link-hover-color-rgb: 199, 210, 254;
--bs-focus-ring-color: rgba(129, 140, 248, 0.35);
--wdw-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -16px rgba(0, 0, 0, 0.7);
--wdw-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 12px -4px rgba(0, 0, 0, 0.5);
--wdw-stage: #0f1117;
}
body { font-family: var(--wdw-font); -webkit-font-smoothing: antialiased; }
/* Bootstrap compiles its blue into these components; point them at the accent. */
.btn-primary {
--bs-btn-bg: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: #4338ca; --bs-btn-hover-border-color: #4338ca;
--bs-btn-active-bg: #3730a3; --bs-btn-active-border-color: #3730a3;
--bs-btn-disabled-bg: var(--bs-primary); --bs-btn-disabled-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
[data-bs-theme="dark"] .btn-primary { --bs-btn-color: #0f1117; --bs-btn-hover-bg: #a5b4fc; --bs-btn-hover-border-color: #a5b4fc; --bs-btn-hover-color: #0f1117; --bs-btn-active-color: #0f1117; }
.btn-outline-primary {
--bs-btn-color: var(--bs-primary); --bs-btn-border-color: var(--bs-primary);
--bs-btn-hover-bg: var(--bs-primary); --bs-btn-hover-border-color: var(--bs-primary);
--bs-btn-active-bg: var(--bs-primary); --bs-btn-active-border-color: var(--bs-primary);
--bs-btn-focus-shadow-rgb: var(--bs-primary-rgb);
}
.btn { --bs-btn-font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn-sm { min-height: 36px; }
.form-control, .form-select { min-height: 44px; border-radius: .75rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: rgba(var(--bs-primary-rgb), .6); box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.form-check-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }
.nav-pills { --bs-nav-pills-link-active-bg: var(--bs-primary); }
.nav { --bs-nav-link-color: var(--bs-secondary-color); --bs-nav-link-hover-color: var(--bs-emphasis-color); }
.pagination { --bs-pagination-active-bg: var(--bs-primary); --bs-pagination-active-border-color: var(--bs-primary); --bs-pagination-color: var(--bs-body-color); --bs-pagination-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.progress, .progress-stacked { --bs-progress-bar-bg: var(--bs-primary); }
.list-group { --bs-list-group-active-bg: var(--bs-primary); --bs-list-group-active-border-color: var(--bs-primary); }
.dropdown-menu { --bs-dropdown-link-active-bg: var(--bs-primary); border-radius: .875rem; box-shadow: var(--wdw-shadow-sm); }
.accordion { --bs-accordion-active-bg: var(--bs-primary-bg-subtle); --bs-accordion-active-color: var(--bs-primary-text-emphasis); --bs-accordion-btn-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color); }
.badge { font-weight: 600; }
/* Library building blocks — use these instead of re-inventing them per snippet. */
.wdw-stage { min-height: 100vh; display: flex; align-items: center; background: var(--wdw-stage); padding-block: 3rem; }
.wdw-card { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: var(--wdw-radius-card); box-shadow: var(--wdw-shadow); }
.wdw-card-sm { background: var(--bs-body-bg); border: 1px solid var(--bs-border-color-translucent); border-radius: 1rem; box-shadow: var(--wdw-shadow-sm); }
.wdw-aurora { position: relative; color: #fff; background: radial-gradient(60% 55% at 100% 0, #818cf8 0, transparent 70%), radial-gradient(65% 60% at 0 100%, #ec4899 0, transparent 65%), #1e1b4b; }
.wdw-eyebrow { display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--bs-primary); }
.wdw-heading { font-weight: 800; letter-spacing: -.02em; color: var(--bs-emphasis-color); }
.wdw-muted { color: var(--bs-secondary-color); }
.wdw-icon { width: 2.75rem; height: 2.75rem; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: .875rem; background: var(--bs-primary-bg-subtle); color: var(--bs-primary); }
/* Component */
.note { --note-bg: var(--bs-body-bg); --note-fg: var(--bs-body-color); position: relative; isolation: isolate; display: flex; flex-direction: column; padding: 1.25rem; min-height: 11rem; border-radius: 1rem; color: var(--note-fg); transition: transform .25s ease; }
.note::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--note-bg); border: 1px solid var(--bs-border-color); box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 14px 24px -14px rgba(16,24,40,.35); transform: rotate(var(--tilt, 0deg)); transition: transform .25s ease, box-shadow .25s ease; }
.note::after { content: ""; position: absolute; right: 0; bottom: 0; width: 1.75rem; height: 1.75rem; border-radius: .75rem 0 1rem 0; background: linear-gradient(135deg, var(--bs-tertiary-bg) 50%, rgba(var(--bs-emphasis-color-rgb), .12) 50%); }
.note--accent { --note-bg: var(--bs-primary-bg-subtle); --note-fg: var(--bs-primary-text-emphasis); }
.note--accent::before { border-color: var(--bs-primary-border-subtle); border-left: 4px solid var(--bs-primary); }
.note:hover::before, .note:focus-within::before { transform: rotate(0) scale(1.03); }
.note:focus-within::before { box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color), 0 24px 36px -16px rgba(16,24,40,.45); }
.note-tag { background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); border: 1px solid var(--bs-primary-border-subtle); }
.note--accent .note-tag { background: var(--bs-primary); color: #fff; border-color: var(--bs-primary); }
[data-bs-theme="dark"] .note--accent .note-tag { color: #0f1117; }
.note-title, .note-body { outline: 0; border-radius: .25rem; }
.note-title:focus, .note-body:focus { box-shadow: 0 0 0 2px var(--bs-focus-ring-color); }
.note-body { font-size: .95rem; line-height: 1.5; flex: 1; }
.note-foot { margin-top: 1rem; padding-right: 1.5rem; color: var(--bs-secondary-color); }
.note--accent .note-foot { color: inherit; opacity: .8; }
.note-del { width: 2.75rem; height: 2.75rem; margin: -.6rem 0; border: 0; border-radius: 50%; background: transparent; color: inherit; font-size: 1.25rem; line-height: 1; opacity: .7; }
.note-del:hover, .note-del:focus-visible { opacity: 1; background: var(--bs-tertiary-bg); }
.note-del:focus-visible { outline: 2px solid var(--bs-primary); }
@media (min-width: 992px) { .note { aspect-ratio: 1 / 1; min-height: 0; } }
@media (prefers-reduced-motion: reduce) { .note, .note::before { transition: none; } .note:hover::before { transform: rotate(var(--tilt, 0deg)); } }
.note--plain { --note-bg: var(--bs-body-bg); }
function initNotes() {
var btn = document.getElementById('addNote');
var board = document.getElementById('noteBoard');
if (!btn || !board) return;
var count = board.children.length;
btn.addEventListener('click', function () {
count++;
var col = document.createElement('div');
col.className = 'col-12 col-sm-6 col-lg-4';
var tilt = Math.random() < 0.5 ? -1 : 1;
col.innerHTML = '<article class="note note--' + (count % 3 === 0 ? 'accent' : 'plain') + '" style="--tilt:' + tilt + 'deg">' +
'<div class="d-flex justify-content-between align-items-start gap-2 mb-2"><h3 class="h6 fw-bold mb-0 note-title" contenteditable="true" spellcheck="false" role="textbox" aria-label="Note title">New note</h3><span class="badge rounded-pill note-tag">Draft</span></div>' +
'<p class="note-body mb-0" contenteditable="true" spellcheck="false" role="textbox" aria-multiline="true" aria-label="Note text">Jot something down here.</p>' +
'<footer class="note-foot d-flex justify-content-between align-items-center small"><span>Today</span><button type="button" class="note-del" aria-label="Delete note">×</button></footer></article>';
board.appendChild(col);
var title = col.querySelector('.note-title');
title.focus();
document.getSelection().selectAllChildren(title);
});
board.addEventListener('click', function (e) {
var del = e.target.closest('.note-del');
if (!del) return;
var col = del.closest('.col-12');
var next = col.nextElementSibling || col.previousElementSibling;
col.remove();
if (next) next.querySelector('.note-title').focus(); else btn.focus();
});
}
initNotes();
Built on Bootstrap 5.3.8 with plain JavaScript — no jQuery. Supports light and dark mode via data-bs-theme.