Skip to content

Conversation

@tianenpang
Copy link
Member

@tianenpang tianenpang commented Dec 25, 2025

📝 Description

Adds size prop support to AlertDialog.Container component, allowing users to control the dialog width with predefined size variants: xs, sm, md, lg, and cover. This implementation follows the same pattern as the Modal component for consistency.

⛳️ Current behavior (updates)

  • AlertDialog.Container only supports placement prop
  • No size variants available for alert dialogs
  • All alert dialogs use a fixed default width

🚀 New behavior

  • AlertDialog.Container now accepts a size prop with values: "xs" | "sm" | "md" | "lg" | "cover"
  • Default size is "md" (matches Modal behavior)
  • Size variants apply max-width constraints to the dialog:
    • xs: max-w-xs (20rem / 320px)
    • sm: max-w-sm (24rem / 384px)
    • md: max-w-md (28rem / 448px) - default
    • lg: max-w-lg (32rem / 512px)
    • cover: Full height and width with margins
  • Added size variants to styles, component implementation, CSS classes, documentation, demos, and Storybook stories
  • Note: full size variant is not included as alert dialogs don't require fullscreen mode

💣 Is this a breaking change (Yes/No):

No.

📝 Additional Information

  • Implementation follows the same pattern as Modal component for consistency
  • All size variants use BEM naming convention (e.g., alert-dialog__dialog--xs)
  • Size prop is optional and defaults to "md" if not specified
  • Includes comprehensive documentation and demo examples

@vercel
Copy link

vercel bot commented Dec 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
heroui Ready Ready Preview, Comment Dec 26, 2025 10:36pm
heroui-sb Ready Ready Preview, Comment Dec 26, 2025 10:36pm

@changeset-bot
Copy link

changeset-bot bot commented Dec 25, 2025

⚠️ No Changeset found

Latest commit: 35f0a24

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 25, 2025

Open in StackBlitz

npm i https://pkg.pr.new/heroui-inc/heroui/@heroui/react@6051
npm i https://pkg.pr.new/heroui-inc/heroui/@heroui/styles@6051

commit: 35f0a24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

♿ Scope: v3 Related to HeroUI v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants