Skip to content

Tooltip widget #92

@rishson

Description

@rishson

Specification

This widget provides tooltip behaviour.

Features

  • You specify the content for a tooltip.
  • Tooltip content can contain arbitrary vDOM nodes and widgets, e.g.

screen shot 2017-03-30 at 2 30 03 pm

- The tooltip can be positioned to open in different directions, _relative_ to the element that causes the tooltip to be shown, e.g. `{position: TooltipPosition.TopCenter}` would open a tooltip above the element.

screen shot 2017-03-30 at 2 32 50 pm

  • You can specify the event that will launch a tooltip. Usually this will be the hover of an element, but it could also be a click event etc.

Value-add of the widget (e.g. why use rather than just use VDom directly)
Ability to provide advanced styling and animation.

List of callback funcs that can be passed in props (if any)
onHide
onShow

Mouse/keyboard interactions (if any)
Depends on the content of the tooltip. If the tooltip contained widgets, then would you need to be able to tab into this content - or is this horrendous UX 🤔 This affects the acceptance criteria.

Mandatory/valid/empty/wait states (if any)
None

Is the widget controlled/uncontrolled
Controlled

List of any icons needed

Design input required (inc responsive design)
Look and feel of the tooltip, pointing arrow.

Any other considerations:

Questions

Acceptance criteria

When I perform an action that should make a tooltip appear, the tooltip appears, without obscuring the element that I was interacting with.
When I perform an action that should make the tooltip disappear, then when the tooltip is no longer shown, the focus should be on the element that had focus before the tooltip was shown.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions