Web OTP API Demo - Online Auto‑Read SMS Codes
Demonstrate how the Web OTP API automatically reads one‑time codes from SMS (mobile). Simulation with a fake SMS input.
UD5 Toolkit
The Custom Highlight API is a modern browser feature that allows developers to highlight text programmatically without modifying the DOM structure. This API uses the Highlight object and the CSS.highlights registry to manage highlights efficiently.
Unlike traditional approaches that wrap text in span elements, the Highlight API creates range-based highlights that are rendered natively by the browser. This means better performance for dynamic highlighting scenarios such as search results, syntax highlighting, and collaborative editing.
The API is part of the CSS Highlight API specification and works alongside the ::highlight() pseudo-element. Developers can define multiple highlight groups with different priorities, and the browser handles overlap rendering automatically. Each highlight can have its own styling via the highlight pseudo-element.
Browser support for the Highlight API is growing. Chrome and Edge have supported it since version 105, while other browsers are actively implementing the specification. For applications that need to highlight text in real-time—such as find-in-page features or live search filtering—this API provides a significant performance improvement over DOM-based highlighting.
No highlight groups yet. Add one above.
Highlight objects (collections of Range or StaticRange objects) registered in the CSS.highlights registry. Styling is applied via the ::highlight() CSS pseudo-element. This approach is more performant than wrapping text in <span> elements because it doesn't trigger layout recalculations or mutate the DOM tree.
<span> or <mark> elements, which mutates the DOM. This causes layout thrashing, breaks CSS :nth-child selectors, and complicates text selection. The Custom Highlight API renders highlights as an overlay on top of the existing text, leaving the DOM untouched. This preserves event listeners, selection behavior, and avoids performance penalties during frequent updates.
::highlight() pseudo-element supports a limited subset of CSS properties: color, background-color, text-decoration (and related properties like text-decoration-color, text-decoration-style), text-shadow, -webkit-text-stroke, and text-emphasis. Properties like border, padding, margin, font-size, and animations are not supported to ensure highlights render efficiently without affecting layout.
Highlight object has a priority property (an integer). When multiple highlights overlap on the same text range, the highlight with the higher priority value is painted on top. The default priority is 0. This is useful when you have different types of highlights—for example, search matches (priority 10) should appear above syntax highlights (priority 5), which should appear above spell-check underlines (priority 1).
Range can span across multiple text nodes and elements. The Custom Highlight API handles cross-element ranges gracefully, painting the highlight continuously across element boundaries. This is a major advantage over DOM-based approaches, where wrapping text across element boundaries often requires splitting text nodes and restructuring the DOM tree.
CSS.highlights.delete('highlight-name'). To clear all highlights, use CSS.highlights.clear(). To update a highlight, simply create a new Highlight object with updated ranges and set it using the same name: CSS.highlights.set('my-highlight', newHighlight). The old highlight is automatically replaced without any DOM manipulation needed.
Demonstrate how the Web OTP API automatically reads one‑time codes from SMS (mobile). Simulation with a fake SMS input.
Browse a collection of ready-to-use CSS animations (fade, slide, bounce). Click to preview, then copy @keyframes and class to your project. Local tool.
Press any key to see the complete KeyboardEvent properties: key, code, keyCode, modifiers. Indispensable for game & shortcut developers.
Enter a URL and see a list of its ARIA landmarks (banner, main, nav). Check document structure for accessibility. Local fetch.
Create a sticky scroll progress bar for blog posts. Choose colors and height. Copy the minimal CSS and HTML.
A small widget that records your clipboard text history (only while open). Search and re‑copy old snippets. No log upload.
Generate a standard XML sitemap for your website by entering a start URL. Crawls internal links directly from your browser. No server-side processing.
Build a complete Nginx location block for reverse proxy, static files, or redirect. Copy the snippet. Quick config help.
Log which family member takes which medicine and when. Reminders for next dose. Data stays local.
Estimate how many MB/GB your storage can hold based on navigator.storage.estimate() and display as a pie chart.
Enter readings before/after meals, get averages, print report. Local storage only.
Check current browser storage usage (localStorage, IndexedDB, Cache) and available quota. Handy debugging tool.
See the International Space Station’s current position on a world map in real time. Uses public API. No refresh.
Visually configure scroll‑snap containers and items. Adjust alignment, stop behavior, and padding. Copy the clean CSS instantly.
Create complex linear gradients with any number of color stops, exact angles, and length units. Live preview and CSS code.
Style underlines, overlines, and strike-throughs with colors, wavy styles, and thickness. Modern CSS text‑decoration.
Design a fully styled scrollbar with colors, width, radius, and hover effects. Supports both ::-webkit‑scrollbar and Firefox scrollbar‑width.
Create CSS clamp() values for fluid typography. Enter min and max font sizes and viewport widths. Modern responsive design.
Create CSS mask‑image effects with custom shapes, gradients, and SVGs. Visually see the mask applied to an image. Copy the CSS.
Paste your CSS and sort the properties of each rule alphabetically or by concentric groups. Keep your stylesheets consistent without a build step.
Create a customizable checkerboard or grid background using pure CSS gradients. Adjust cell size and colors. Copy the code.
Upload two images and apply CSS blend modes (multiply, screen, overlay, etc.). See the result and copy the filter CSS. Pure frontend.
Add print styles like removing backgrounds, adding page breaks, setting margins. See print preview instantly.
Write a media query and instantly see if it matches your current viewport. Width, height, orientation, and more.
Paste your CSS and strip all `!important` declarations in one click. See a list of affected rules. Local tool.
Paste HTML/CSS snippets or enter properties to test how z‑index and stacking contexts interact. Real‑time example.
Adjust margin, border, padding, and content sizes interactively and see the rendered box model. Get the exact CSS. Teach or learn layout.
Design a pure CSS tooltip with custom text, position (top/bottom/left/right), and arrow. Copy the clean code.
Practice CSS selectors by targeting plates on a virtual restaurant table. 30+ levels. Perfect for beginners.
Fetch a website's CSS and extract :root custom properties (‑‑color) to reveal its design token palette. For learning and inspiration.