Skip to content

[bug]: Alert components that include a shape and exclude a Title aren't vertically centered #7473

Open
@jonathanmarchuot

Description

@jonathanmarchuot

Describe the bug

  • Alerts with a Shape + Title + Description display correctly.

  • Alerts with only a Description display correctly.

  • Alerts with a Shape + Description (and title excluded): contents are vertically offset. (see below)

Affected component/components

Alert

How to reproduce

<Alert>
    <AlertCircle className="h-4 w-4" />
    <AlertDescription>Your session has expired. Please log in again.</AlertDescription>
</Alert>

Image

Notes

It looks like Alert is based on the Radix Callout primitive, and it doesn't look like Alert is inheriting the problem from there.

System Info

Next.js 15.2.4 on a node:22-alpine Docker image

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions