Always follow the “Principle of least power”. Use the pattern that requires that least code and the least complexity to get the job done. Some examples:
Don’t use javascript for interactions that can be achieved with CSS.
Don’t use custom-written CSS for styles that can be achieved with Base Styles or Tailwind.
Pattern Priorities
If you can achieve it by adding an existing class (or classes) from the base-styles library to a new or existing html element.
Add an existing class (or classes) from Tailwind Lite to a new or existing html element.
Add minor interactivity by toggling classes on click or change, using Mini JS.