Skip to content

[New Feature] Add Multiple direction support for Tooltip #577

@kotAPI

Description

@kotAPI

🚀 Feature Request


Feature Description

Tooltip should support a prop for placement, to begin with we can add support for

1. Cardinal Directions

top
bottom
left
right

2. Compound Directions

For offsets or alignment toward corners:

top-left / top-start
top-right / top-end
bottom-left / bottom-start
bottom-right / bottom-end
left-top / left-start
left-bottom / left-end
right-top / right-start
right-bottom / right-end
Tip: The "start" and "end" nomenclature pairs well with bidirectional (LTR/RTL) layouts.

Shall we consider something like this?

{ position: "top", // Places the tooltip above the target alignment: "start", // Aligns the tooltip to the left strategy: "auto", // Adjusts position based on viewport space }

Note: We use Floating UI - If I recall correctly, most of these placements are already supported by the library
https://floating-ui.com/docs/tooltip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions