fix(modal): center title independently of close button - #5
Conversation
|
@yeyuqwer is attempting to deploy a commit to the ozer's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@yeyuqwer nice catch, i'll try it myself and merge it. thanks a lot |
|
Real issue, nice fix. But the old flex layout guaranteed the title could never run under the ✕, now a long first line can slide under it. Per DESIGN.md §14 (reserve space up front), can this be solved while keeping that guarantee? Also drawer.tsx has the same header pattern and should stay consistent. |
|
Thanks for the feedback. I'll update the implementation to keep the title from overlapping with the close button and make drawer.tsx consistent as well. |
@yeyuqwer thank you so much! take your time! |
|
One follow-up question: since I saw that Should I add metadata overrides in I have left |
|
@yeyuqwer i'll think about your comments a bit and get back to you. thanks for taking the time |


Hi, thank you for open-sourcing this component library. I have really enjoyed using it in my project.
While using the Modal component, I tried to center the title:
However, I noticed that the title was not visually centered relative to the entire modal. The close button participates in the header's flex layout and occupies space on the right, so the title is only centered within the remaining content area.
This PR positions the close button independently from the title layout, allowing the title container to use the full header width and align with the actual center of the modal.
The purpose of this change is only to make centered titles work as expected for users who need them in the future. It does not change the demo or the default title alignment. Modal titles remain left-aligned by default.
This is only a small visual alignment improvement, not a critical issue. Please feel no pressure to merge it if the current behavior better matches the intended design.
After & Before