Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Balloon component #348

Open
WesSouza opened this issue Aug 6, 2022 · 0 comments
Open

Add Balloon component #348

WesSouza opened this issue Aug 6, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@WesSouza
Copy link
Member

WesSouza commented Aug 6, 2022

Win32 has the Balloon Control which provides a dialog box styled layer that can be used to provide contextual help while a user is interacting with a form, similar to an onboarding tooltip, or dialog from an avatar such as Clippit.

It should automatically position according to the screen boundaries, optimally starting at an anchor point to be determined.

The direction uses the concepts of CSS Logical Properties's Flow Values, where the Balloon is positioned above (block-start), below (block-end), to the left (inline-start) or to the right (inline-end) of the positionRelativeTo coordinates.

type BalloonProps = {
  children?: React.Node;
  direction?: 'block-start' | 'block-end' | 'inline-start' | 'inline-end'
  positionRelativeTo?: DOMRect;
}

defaults = {
  direction: 'block-start'
}

The Balloon tip should be centered at the side of the Balloon direction points at.

If positionRelativeTo is set, the Balloon has absolute position centered with that coordinate.

If positionRelativeTo is not set, the Balloon has block display and static position.

A useRelativePosition hook should be created to help with this positioning logic.

Screenshot 2022-08-06 at 7 33 57 AM

@WesSouza WesSouza added enhancement New feature or request v4 @beta labels Aug 6, 2022
@WesSouza WesSouza removed the v4 @beta label Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant