Skip to content
CZECH TH!S Custom websites
EN CS

CSS Can Now Build the Dropdowns and Popups You Used to Need JavaScript For

A year ago, a simple rule applied: anything that needed to "float" above the rest of the page — a custom select menu, a tooltip, a popover, a date picker attached to an input — meant reaching for a JavaScript library. Popper.js, Floating UI, a custom React component with a portal. It was a necessary evil, because CSS simply couldn't calculate where such an element should sit so it wouldn't run off the edge of the screen.

That's changing in 2026. Two features that have been rolling out to browsers piece by piece over the past few months now add up to a genuinely significant shift: CSS Anchor Positioning and customizable select elements (appearance: base-select). As a developer who just replaced an old dropdown menu's three JS dependencies with fifteen lines of CSS, I want to explain what this means for you as a designer too.

What Actually Changed

CSS Anchor Positioning lets you "tether" any element to another one — a tooltip to a button, a popover to an icon, a dropdown menu to a field — and the browser itself calculates where the element should fit, including flipping it to the other side automatically if it would otherwise overflow the viewport. This used to be math that JavaScript had to redo on every scroll and resize; now the browser engine handles it natively, faster and without flicker.

appearance: base-select goes even further for select menus: it lets you design a completely custom look for a dropdown list — with icons, multi-line text, custom styling for the selected item — while keeping all the accessibility and keyboard navigation that a native select has always had built in for free. Until now you had to choose: an ugly but accessible native element, or a pretty but often inaccessible custom widget.

What This Means for Your Designs

This is the part I want to stress to designers: things you might have previously ruled out with "that's too complicated to build" are suddenly cheap today. Custom-styled selects, smart tooltips that never get clipped by the edge of the screen, popover menus anchored precisely to the right element — all of this can now be built faster and more reliably than it could back in 2023.

That said, this only holds in modern browsers. Anchor positioning and base-select are both furthest along in Chrome, with other browsers catching up gradually — so it's still worth having a simpler fallback ready for older Safari or Firefox, rather than assuming it works identically everywhere.

The Practical Impact on Collaboration

Next time you're designing a dropdown menu or a tooltip, go ahead and ask the developer directly: "can this be done in plain CSS now, or does it still need a JS library?" The answer has shifted a lot over the past year, and the sooner you know that, the fewer unnecessary compromises you'll make in a design just because something "used to be expensive to build."

A few concrete things that pay off today:

  • Ask whether a specific interactive element (tooltip, dropdown, popover) can be built purely in CSS.
  • Check browser support before you promise a client a specific look — not everything runs the same everywhere yet.
  • Keep an eye on caniuse.com for new CSS features so you know when it's safe to ship them for real.

Conclusion

This shift is a small example of a much bigger trend: browsers are gradually taking over work that used to require JavaScript libraries, and the line between what's "easy" and what's "hard" keeps moving every few months. As a developer, my honest advice is this: ask again about the things we once wrote off together as impossible. The answer might be different today.

← Back to the blog

[ LET'S BUILD ]

Send your design — get a price and deadline within 24 h.

Figma, XD, Sketch or PDF. No strings attached, no dev-speak, under your brand.