CSS Tooltip Generator - Online Hover Popup Builder
Design a pure CSS tooltip with custom text, position (top/bottom/left/right), and arrow. Copy the clean code.
UD5 Toolkit
Explore the native Popover API — create tooltips, menus, modals & more using pure HTML attributes. No JavaScript required.
Click the button to toggle. Click outside or press Esc to close — all built into the browser.
<button popovertarget="my-popover">Toggle</button>
<div id="my-popover" popover="auto">
Hello! I'm a native popover.
</div>
A tooltip-style popover with custom CSS — dark background, rounded, with smooth animation.
<!-- HTML -->
<button popovertarget="tip">Hint</button>
<div id="tip" class="pop-tooltip" popover="auto">
Styled tooltip!
</div>
<!-- CSS -->
.pop-tooltip {
background: #2d3436; color: #fff;
border-radius: 8px; padding: 0.6rem 1rem;
}
[popover]:popover-open {
opacity: 1; transform: scale(1);
}
[popover]::backdrop {
background: rgba(0,0,0,0.25);
}
A clean dropdown menu built with Popover API — perfect for navigation or action menus.
<button popovertarget="menu">Menu</button>
<div id="menu" class="pop-menu" popover="auto">
<a href="#">Profile</a>
<a href="#">Settings</a>
<a href="#">Help</a>
<hr>
<a href="#">Logout</a>
</div>
<!-- CSS -->
.pop-menu { padding: 0.4rem 0; min-width: 180px; }
.pop-menu a { display: block; padding: 0.55rem 1.2rem; }
A confirmation dialog using Popover API. Includes action buttons — all declarative.
Are you sure? This action cannot be undone.
<button popovertarget="confirm">Delete</button>
<div id="confirm" class="pop-confirm" popover="auto">
<strong>Confirm Delete</strong>
<p>Are you sure?</p>
<button popovertarget="confirm"
popovertargetaction="hide">
Delete
</button>
<button popovertarget="confirm"
popovertargetaction="hide">
Cancel
</button>
</div>
A notification-style popover with a colored accent border. Great for alerts and toasts.
<button popovertarget="notify">Show Alert</button>
<div id="notify" class="pop-notify" popover="auto">
<strong>✅ Success!</strong>
<small>Your changes have been saved.</small>
</div>
<!-- CSS -->
.pop-notify {
border-left: 4px solid #10b981;
max-width: 300px;
}
A classic hover tooltip using zero JavaScript — no Popover API needed. Works in all browsers.
<!-- HTML -->
<span class="tooltip-wrap">
Hover me
<span class="tooltip">Pure CSS tooltip!</span>
</span>
<!-- CSS -->
.tooltip-wrap { position: relative; cursor: pointer; }
.tooltip {
position: absolute; bottom: calc(100% + 8px);
left: 50%; transform: translateX(-50%);
background: #2d3436; color: #fff; padding: 0.5rem;
border-radius: 6px; opacity: 0; pointer-events: none;
transition: opacity 0.18s;
}
.tooltip-wrap:hover .tooltip { opacity: 1; }
Multiple buttons targeting the same popover. Any trigger toggles it.
<button popovertarget="shared">Open</button>
<button popovertarget="shared">Also Opens</button>
<button popovertarget="shared"
popovertargetaction="hide">Close</button>
<div id="shared" popover="auto">
Shared popover content!
</div>
Smooth scale+fade animation using :popover-open and @starting-style.
[popover] {
opacity: 0;
transform: scale(0.95);
transition: opacity 0.18s, transform 0.18s,
overlay 0.18s allow-discrete,
display 0.18s allow-discrete;
}
[popover]:popover-open {
opacity: 1;
transform: scale(1);
}
@starting-style {
[popover]:popover-open {
opacity: 0;
transform: scale(0.95);
}
}
popover attribute and popovertarget attribute for declarative show/hide behavior, with built-in light dismiss (click outside to close), Esc key support, and top-layer rendering above all other content.
popover="auto": The browser manages the popover — it closes automatically when you click outside (light dismiss) or press Esc. Only one auto popover can be open at a time. Best for most use cases.popover="manual": You control show/hide via JavaScript. Multiple manual popovers can be open simultaneously. Useful for persistent tooltips, multi-step workflows, or programmatic control.
popover="auto": when a user clicks anywhere outside the popover (or presses Esc), the popover closes automatically. This is powered by an invisible ::backdrop layer that captures clicks. You can style this backdrop with CSS — for example, adding a semi-transparent overlay: [popover]::backdrop { background: rgba(0,0,0,0.3); }
popover="auto" + popovertarget for click-to-show tooltips with full accessibility.:hover pseudo-class with absolutely positioned elements for hover-triggered tooltips, which work in all browsers including older ones.aria-label or aria-labelledby where appropriate, and ensure sufficient color contrast.
:popover-open pseudo-class combined with CSS transitions. Set initial styles (e.g., opacity: 0; transform: scale(0.95);) on the [popover] selector, then override them in [popover]:popover-open. For enter animations, use @starting-style (Chrome 117+) to define the pre-open state. Include allow-discrete in transitions for smooth overlay behavior.
#my-popover { position-anchor: --trigger; top: anchor(bottom); }Design a pure CSS tooltip with custom text, position (top/bottom/left/right), and arrow. Copy the clean code.
Design a tooltip that appears on hover without JavaScript. Choose positioning, arrow, and animation. Copy the clean HTML/CSS.
Open a modal and see how focus is trapped and restored. Copy the lightweight focus‑trap code. Accessible pattern.
Paste a screenshot or image, crop it, and add arrows, rectangles, and text. Essential for bug reports and tutorials.
Interactively add and adjust multiple box shadows on a sample element. Drag sliders for offset, blur, spread, and color. Copy the clean CSS code instantly.
Visually experiment with Flexbox container and item properties. See the layout update in real time and copy the CSS. Learn by doing, fully interactive.
Type raw HTML and see the escaped version, then see how it renders when unescaped. Understand encoding better.
Visually configure scroll‑snap containers and items. Adjust alignment, stop behavior, and padding. Copy the clean CSS instantly.
Use the EyeDropper API to sample a color from anywhere on your screen. Click, select, and copy the hex. No extensions needed.
Paste code and generate a beautiful, syntax‑highlighted PNG image. Choose theme and window style. Shareable code pics.
Design neumorphic elements by adjusting box‑shadow parameters. Real‑time preview and CSS output. For modern soft UI interfaces.
Learn how to let content extend a few pixels beyond a clip boundary with overflow‑clip‑margin. Interactive playground.
Design a fully styled scrollbar with colors, width, radius, and hover effects. Supports both ::-webkit‑scrollbar and Firefox scrollbar‑width.
Generate a random HTML/CSS card with different box model properties. Inspect and guess the size. For learners.
Design a fully styled scrollbar with colors, width, and border radius. Get the CSS for Chrome and Firefox.
Touch the screen and see the exact coordinates, radius, and force of each touch point. Indispensable for mobile web devs.
Design layered box shadows interactively and get the CSS code in real time. Adjust offset, blur, spread, and color. Essential tool for UI designers.
Upload an image and get a suggested alt text description using a local vision model (WASM). Improve SEO and accessibility fast.
Use the browser's native eyedropper tool to pick any color from the screen. Shows zoomed preview. Quick and easy.
See how scroll‑padding and scroll‑margin affect the position of elements when using anchor links or scroll‑snap. Visual.
Adjust margin, border, padding, and content sizes interactively and see the rendered box model. Get the exact CSS. Teach or learn layout.
Create a 'SALE' or 'NEW' corner ribbon in pure CSS. Adjust colors, position, and text. Great for e‑commerce.
Use anchor positioning to perfectly center a popover relative to its anchor. No JavaScript. See the modern approach.
Paste your CSS and see warnings for properties that have limited browser support. Links to CanIUse. Modernize safely.
Visually adjust each corner's radius on an image independently. Preview and download as PNG. For non‑uniform rounding.
Design a custom focus indicator with outline, offset, and box‑shadow. Preview on interactive elements. Copy the CSS.
Number each line of your text sequentially. Customize start number and format. Useful for code snippets, tutorials, and document review. Private operation.
Use isolation: isolate to contain mix‑blend‑mode and filters. See the visual difference with and without. Quick demo.
Create a passkey and authenticate using the Web Authentication API. Supports platform authenticators (TouchID, FaceID). No server.
Upload an image and generate the CSS to use it as a custom mouse cursor. Test it live. Fun for personal websites.