Nobody thinks about the tab bar
Most people never think about what happens when a row of tabs runs out of room. The tabs wrap onto a second line, or get quietly clipped at the edge, and everyone just accepts it. That's the thing I keep noticing about UX: people treat the interface they're handed as a fact of nature, rather than one of a dozen decisions someone could have made differently. An overflowing tab bar isn't a law of physics. It's a problem nobody stopped to solve.
At Stax I had a reason to stop. The same Companies detail tabs (Info, Data Fields, People, and a few more) rendered both in a narrow peek drawer and on the full-width page — one component, anywhere from about 440 pixels to half a screen. A fixed row doesn't survive that range, so I had to decide what should happen when the tabs don't fit. There are two answers I like, both built from default shadcn line tabs with nothing custom underneath.
Option one: let it scroll
The Info panel.
The honest, two-lines-of-CSS answer: stop the row wrapping and let it scroll. It's fine on a phone, where swiping sideways is second nature. On desktop a thin horizontal scrollbar is easy to miss, and a tab you can't see is a tab nobody clicks. It works, but it hides things.
Option two: collapse into "More"
The Info panel.
The better answer, the one I shipped, measures how many tabs actually fit, shows those, and folds the rest into a "More" dropdown. It recomputes whenever the container resizes, so it stays right at every width, and if the tab you're on lands in the overflow, the More button takes on the active underline so you're never stranded. Nothing disappears. There's a hidden row quietly measuring the tabs and a ResizeObserver watching the width, but the machinery isn't really the point.
What it could be
The point is that someone had to look at a tab bar, notice the moment it runs out of room, and decide it deserved better than the default. That's most of design engineering — not the clever measuring code, but the willingness to treat a small, ignorable interaction as something worth getting right. The scroll version is what UX usually is. The collapsing one is what it could be, and the gap between the two is mostly just whether anyone thought to ask.