tailwindlabs / tailwindui-issues

Bug fixes and feature request tracking for Tailwind UI.
233 stars 4 forks source link

Catalyst Alert component naming is confusing #1617

Closed peciulevicius closed 1 month ago

peciulevicius commented 1 month ago

What component (if applicable)

Describe the bug I honestly think the component naming is a bit confusing, tailwind UI alert components are what I expect Catalyst alerts to look like.

Now Catalyst alert and dialog components are pretty similar, in fact I have a hard time telling what are the differences between them and if they work somehow differently under the hood.

adamwathan commented 1 month ago

Hey! So the main difference between Alerts and Dialogs in Catalyst are stylistic — Alerts have a bit less padding and smaller titles than Dialogs do:

image image

Functionally there isn't any difference.

Alerts are intended for the sort of situation you'd use window.alert('…') (hence the name), and Dialogs are typically for things like forms that pop up over an existing page to do things like create a new user/project/whatever, refund a payment, etc.

Naming is tricky for sure 😕 Going to stick with Alert on this one because of the connection to window.alert() but of course you can rename it in your project (or even delete it if you don't plan to use it).

Appreciate the feedback regardless!