Toggle buttons are my new favorite component on mobile

Dec 30, 2025 / 1 min read

Language Mismatch Disclaimer: Please be aware that the language of this article may not match the language settings of your browser or device.
Do you want to read articles in English instead ?

https://youtube.com/shorts/igs98JSTXRU

Context

While working on Traxelio, I realized I was using the same select patterns again and again. The built-in select component worked, but it felt rigid. Styling was limited, and adapting it to different screens or use cases took more effort than expected.

This pushed me to rely more on a custom select component that I could fully control.

Why a Custom Select Made More Sense

The main reason was flexibility. This component can be used as a single select or a multi-select. It adapts easily to different screen sizes and UI needs. Sometimes it looks like pills, sometimes more like a simple list. The same base logic, different presentation.

Because I know exactly what data goes in, I can keep the UI simple and predictable.

When This Component Works Well (And When It Doesn’t)

This approach works best when the number of options is limited and known in advance. UX stays clean and fast. Users are not overwhelmed, and interactions remain simple.

However, if the number of options grows too large, this breaks down quickly. In that case, a more traditional select component that pulls data from a remote source makes more sense. This is not something to use everywhere.

Solving a Real Pain Point: Permissions Selection

This week, I used the component for permissions selection. Selecting each permission one by one became painful very quickly. I resisted the urge to over-automate things.

The simplest fix was adding “select all” and “deselect all”. Low effort, high impact. The logic stayed clean, and the UX improved immediately.

The Benefit of Modular Components

The best part is reuse. Once the feature was added, it became available everywhere the component is used. No duplication. No extra wiring.

This is why I like building modular components. Small improvements compound over time and make the app easier to maintain.

Final Thoughts

I’m happy with the result. This component fits my current needs perfectly because the data set is controlled and limited. It’s not a universal solution, but in the right context, it works really well.

Choosing when not to use a component is just as important as choosing to build one.