๐ช๐ต๐ ๐ ๐ฆ๐๐ผ๐ฝ๐ฝ๐ฒ๐ฑ ๐๐ถ๐ด๐ต๐๐ถ๐ป๐ด ๐ง๐ต๐ฒ ๐๐ฟ๐ผ๐๐๐ฒ๐ฟ
I almost installed another dropdown library. I already had libraries for modals and tooltips. I stopped. I asked why I did this.
Browsers have dropdowns. They have modals. They have accordions. I almost spent a weekend rebuilding things browsers ship for free.
Frontend developers often reach for a library. They reset defaults. They override styles. They rebuild keyboard navigation and ARIA roles.
You often get this behavior wrong. You will not out-engineer the people who built the browser. Rebuilding these tools adds accessibility bugs and more code.
My rule is simple. The browser owns the behavior. You own the looks.
- Modals: Use
- FAQs: Use and
. Keyboard support is free.
- Dropdowns: Use
- Sliders: Use .
You think native elements are ugly. You think styling them is impossible. This was true years ago. It is not true now. Modern CSS lets you style form controls and backdrops. Native-first does not mean unstyled.
I still build custom tools when no native version exists. I build filterable comboboxes and command palettes. I extend native pieces instead of starting from zero.
Stop rebuilding what you already have.
My design system uses native-first principles. This approach gives you:
- Less JavaScript to maintain.
- Free accessibility.
- Mobile forms work.
My components are thinner. My bugs decreased.
Next time you need a dropdown, read the docs for
Source: https://dev.to/dimonb19a/why-i-stopped-fighting-the-browser-4l1e