common-intellisense
Version:
185 lines (184 loc) • 6.01 kB
JSON
{
"props": [
{
"Attribute": "children",
"Type": "`ReactNode[]`",
"Description": "The children to render. Usually a trigger element.",
"Default": "-"
},
{
"Attribute": "content",
"Type": "`ReactNode`",
"Description": "The content to render inside the tooltip.",
"Default": "-"
},
{
"Attribute": "size",
"Type": "`sm` | `md` | `lg`",
"Description": "The tooltip size. This change the `content` font size.",
"Default": "`md`"
},
{
"Attribute": "color",
"Type": "`default` | `primary` | `secondary` | `success` | `warning` | `danger`",
"Description": "The tooltip color theme.",
"Default": "`default`"
},
{
"Attribute": "radius",
"Type": "`none` | `sm` | `md` | `lg` | `full`",
"Description": "The tooltip border radius.",
"Default": "`md`"
},
{
"Attribute": "shadow",
"Type": "`none` | `sm` | `md` | `lg`",
"Description": "The tooltip shadow.",
"Default": "`sm`"
},
{
"Attribute": "placement",
"Type": "[TooltipPlacement](#tooltip-placement)",
"Description": "The placement of the tooltip relative to its trigger reference.",
"Default": "`top`"
},
{
"Attribute": "delay",
"Type": "`number`",
"Description": "The delay in milliseconds before the tooltip opens.",
"Default": "`500`"
},
{
"Attribute": "closeDelay",
"Type": "`number`",
"Description": "The delay in milliseconds before the tooltip closes.",
"Default": "`0`"
},
{
"Attribute": "isOpen",
"Type": "`boolean`",
"Description": "Whether the tooltip is open by default (controlled).",
"Default": "-"
},
{
"Attribute": "defaultOpen",
"Type": "`boolean`",
"Description": "Whether the tooltip is open by default (uncontrolled).",
"Default": "-"
},
{
"Attribute": "offset(px)",
"Type": "`number`",
"Description": "The distance or margin between the reference and popper. It is used internally to create an offset modifier.",
"Default": "`7`"
},
{
"Attribute": "containerPadding(px)",
"Type": "`number`",
"Description": "The placement padding that should be applied between the element and its surrounding container.",
"Default": "`12`"
},
{
"Attribute": "crossOffset(px)",
"Type": "`number`",
"Description": "The additional offset applied along the cross axis between the element and its anchor element.",
"Default": "`0`"
},
{
"Attribute": "triggerType",
"Type": "`dialog` | `menu` | `listbox` | `tree` | `grid`;",
"Description": "Type of tooltip that is opened by the trigger.",
"Default": "`dialog`"
},
{
"Attribute": "showArrow",
"Type": "`boolean`",
"Description": "Whether the tooltip should have an arrow.",
"Default": "`false`"
},
{
"Attribute": "shouldFlip",
"Type": "`boolean`",
"Description": "Whether the tooltip should change its placement and flip when it's about to overflow its boundary area.",
"Default": "`true`"
},
{
"Attribute": "triggerScaleOnOpen",
"Type": "`boolean`",
"Description": "Whether the trigger should scale down when the tooltip is open.",
"Default": "`true`"
},
{
"Attribute": "shouldBlockScroll",
"Type": "`boolean`",
"Description": "Whether to block scrolling outside the tooltip.",
"Default": "`true`"
},
{
"Attribute": "isKeyboardDismissDisabled",
"Type": "`boolean`",
"Description": "Whether pressing the escape key to close the tooltip should be disabled.",
"Default": "`false`"
},
{
"Attribute": "isDismissable",
"Type": "`boolean`",
"Description": "Whether to close the overlay when the user interacts outside it.",
"Default": "`false`"
},
{
"Attribute": "shouldCloseOnBlur",
"Type": "`boolean`",
"Description": "Whether the tooltip should close when focus is lost or moves outside it.",
"Default": "`true`"
},
{
"Attribute": "motionProps",
"Type": "[MotionProps](#motion-props)",
"Description": "The props to modify the framer motion animation. Use the `variants` API to create your own animation.",
"Default": "-"
},
{
"Attribute": "portalContainer",
"Type": "`HTMLElement`",
"Description": "The container element in which the overlay portal will be placed.",
"Default": "`document.body`"
},
{
"Attribute": "isDisabled",
"Type": "`boolean`",
"Description": "Whether the tooltip is disabled.",
"Default": "`false`"
},
{
"Attribute": "disableAnimation",
"Type": "`boolean`",
"Description": "Whether the tooltip is animated.",
"Default": "`false`"
},
{
"Attribute": "classNames",
"Type": "`Record<\"base\"|\"arrow\", string>`",
"Description": "Allows to set custom class names for the tooltip slots.",
"Default": "-"
}
],
"link": "https://nextui.org/docs/components/tooltip",
"events": [
{
"Attribute": "onOpenChange",
"Type": "`(isOpen: boolean) => void`",
"Description": "Handler that is called when the tooltip's open state changes."
},
{
"Attribute": "shouldCloseOnInteractOutside",
"Type": "`(e: HTMLElement) => void`",
"Description": "When user interacts with the argument element outside of the tooltip ref, return true if onClose should be called. This gives you a chance to filter out interaction with elements that should not dismiss the tooltip. By default, onClose will always be called on interaction outside the overlay ref."
},
{
"Attribute": "onClose",
"Type": "`() => void`",
"Description": "Handler that is called when the tooltip should close."
}
]
}