Skip to content

[Bug]: Icon button tooltip caret should be centered even if label text itself has "start" or "end" alignment #20063

@samcraftt

Description

@samcraftt

Package

@carbon/react

Browser

Chrome

Package version

1.78.0

Description

When using tooltip alignments like top-start, top-end, bottom-start, and bottom-end, the caret should be centered, even though we want the label text to expand in a certain direction. It looks odd for the caret to be off-centered.

Screenshots

The caret is off-centered using align='bottom-end':
Image

I'm able to achieve the desired appearance using autoAlign + align='bottom-end', but I feel like this shouldn't be necessary:
Image

Steps to reproduce

Render an IconButton component with the align prop set to either top-start, top-end, bottom-start, or bottom-end. Notice that caret is off-centered.

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions