Build or adopt.
WHAT A LIBRARY PROVIDES
Prebuilt components: buttons, inputs, dialogs, menus, tables
Accessibility, in the better ones Keyboard handling Consistent behaviour
WHY THAT MATTERS
Building a dialog or a menu correctly is considerably harder than it appears.
WHAT CORRECTLY MEANS
Focus trapped and restored Escape closing it Announced to assistive technology Keyboard operable throughout
WHAT MOST HAND-BUILT VERSIONS GET WRONG
All of the above.
WHEN TO ADOPT A LIBRARY
Almost always, for complex interactive components.
WHEN TO BUILD
Simple elements Anything requiring an appearance a library cannot produce
WHAT TO EVALUATE IN A LIBRARY
Accessibility, tested rather than claimed How customisable the appearance is Bundle size, and whether unused components are excluded Maintenance activity Documentation quality
WHAT TO BE CAREFUL WITH
Libraries imposing a visual style you must fight Libraries that are unmaintained Coupling every component to one dependency