Tooltip API
Import
Section titled “Import”import { Tooltip } from '@cimpress-ui/react';Accessibility notes
Section titled “Accessibility notes”The element described by the tooltip is automatically associated with the tooltip using the aria-describedby prop. Note that tooltip content won’t usually be announced by screen readers.
The element described by the tooltip must be hoverable and focusable.
Tooltips cannot receive focus nor contain interactive elements.
Tooltips are never shown to users who interact with the UI via touch.
API reference
Section titled “API reference”Tooltip
Section titled “Tooltip”Provides additional information about an element that is hovered or focused.
- Ref<HTMLDivElement>
-
The
reftype for this component.
TooltipProps
- ReactNode
children *
Section titled “ children * ” -
The element that this tooltip describes. Must be focusable and hoverable.
- string
label *
Section titled “ label * ” -
The contents of the tooltip.
- RefObject<Element | null>
triggerRef
Section titled “ triggerRef ” -
The ref for the element which the tooltip positions itself with respect to.
- boolean
isDisabled
Section titled “ isDisabled ” -
Whether the tooltip is disabled.
- boolean
data-cim-style-root
Section titled “ data-cim-style-root ” -
Use this attribute to "claim" the component tree for exclusive Cimpress UI usage.
- string
UNSAFE_className
Section titled “ UNSAFE_className ” -
Sets the CSS className for the element. Only use as a last resort. Use style props instead.
See styling guide.
- CSSProperties
UNSAFE_style
Section titled “ UNSAFE_style ” -
Sets the CSS style for the element. Only use as a last resort. Use style props instead.
See styling guide.
- boolean
isOpen
Section titled “ isOpen ” -
Whether the element is rendered.
- (isOpen: boolean) => void
onOpenChange
Section titled “ onOpenChange ” -
Handler that is called when the overlay's open state changes.
- Placement
placement
Section titled “ placement ” - Defaults to 'top' .
The placement of the tooltip with respect to the trigger.