KeyboardShortcutTooltip
Use the KeyboardShortcutTooltip
component to display a KeyboardShortcut
along with an optional text inside a tooltip. The KeyboardShortcutTooltip
opens on hover and click on its trigger element. The trigger element can only be
an interactive element, like a button or input.
KeyboardShortcutTooltipProps
, , ,
Name | Type | Default | Description |
---|---|---|---|
keys | - | The list of keys the component should display, specified in the aria-keyshortcuts format. | |
shortcutDisabled? | 'false' | Whether the component should be rendered in a disabled state. | |
text? | - | Text displayed in the tooltip component. |
TooltipBaseProps
, , ,
Name | Type | Default | Description |
---|---|---|---|
children | - | Single child of the tooltip considered to trigger the tooltip element. | |
disabled? | false | Defines if the tooltip is disabled or not. | |
placement? | 'top' | Placement of the tooltip relative to its trigger element. | |
defaultOpen? | false | Defines if the tooltip should be open initially when used uncontrolled. | |
open? | - | Defines if the tooltip is open / closed in a controlled component. In
this case, you need to react to | |
delay? | 'default' | Defines the type of delay which is used for the tooltip. | |
onOpenChange? | (isOpen: ) => | - | Callback fired when the tooltip opens. |
fallbackPlacements? | [] | - | Array of placements to be used as fallback if the tooltip doesn't fit at the specified placement. |