Skip to main content
PROYECTOVIVIANA

Tooltip

The props declared for Tooltip, generated from the types @proyecto-viviana/ui ships.

Import

import { Tooltip } from "@proyecto-viviana/ui";

Props

Props for Tooltip in @proyecto-viviana/ui
PropTypeDefaultDescription
children*JSX.Element—The content of the tooltip.
placement'start' | 'end' | 'top' | 'bottom' | 'left' | 'right'—The position of the tooltip relative to the trigger.
variant'default' | 'neutral' | 'info'—Deprecated legacy visual variant. Spectrum 2 tooltips use a single neutral treatment.
stylesStyleString—Spectrum-defined generated classes.
UNSAFE_classNamestring—Additional CSS class name. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles. Use only as a last resort.
classstring—Backward-compatible class alias. Prefer UNSAFE_className for S2 parity.
showArrowfalse | true—Backward-compatible arrow toggle. Spectrum 2 tooltips render an arrow by default.
slotstring | false—A slot name for the component. HTML `slot` may be `false` to omit. solidaria-components
dir'ltr' | 'rtl'—The text direction. solidaria-components
langstring—The element language. solidaria-components
idstring—The element id. solidaria-components
aria-describedbystring—ID of an element that describes the tooltip. solidaria-components
aria-detailsstring—ID of an element that provides details for the tooltip. solidaria-components
aria-labelstring—Custom aria-label for the tooltip. solidaria-components
aria-labelledbystring—ID of an element that labels the tooltip. solidaria-components
isDisabledfalse | true—Whether the tooltip should be disabled. solidaria-components
defaultOpenfalse | true—Whether the tooltip is open by default (uncontrolled). solidaria-components
isOpenfalse | true—Whether the tooltip is open (controlled). solidaria-components
containerPaddingnumber—The placement padding between the tooltip and viewport edge. solidaria-components
offsetnumber—The offset between the tooltip and trigger. solidaria-components
crossOffsetnumber—The additional offset along the cross axis. solidaria-components
shouldFlipfalse | true—Whether the tooltip should flip when there is insufficient room. solidaria-components
arrowSizenumber—The arrow size used to keep the arrow overlapping the trigger. solidaria-components
arrowBoundaryOffsetnumber—The padding between the arrow and tooltip edge. solidaria-components

Declared in packages/viviana-ui/src/tooltip/index.tsx.

TooltipRender props

Props for TooltipRender in @proyecto-viviana/ui
PropTypeDefaultDescription
isEntering*false | true—Whether the tooltip is currently entering (for animations). solidaria-components
isExiting*false | true—Whether the tooltip is currently exiting (for animations). solidaria-components
placement*TooltipResolvedPlacement | null—The placement of the tooltip relative to the trigger. solidaria-components

Declared in packages/solidaria-components/src/Tooltip.tsx.

TooltipTrigger props

Props for TooltipTrigger in @proyecto-viviana/ui
PropTypeDefaultDescription
children*JSX.Element—The children of the tooltip trigger (trigger element and tooltip).
placement'start' | 'end' | 'top' | 'bottom' | 'left' | 'right'—The placement of the tooltip relative to the trigger. solidaria-components
containerPaddingnumber—The placement padding between the tooltip and viewport edge. solidaria-components
crossOffsetnumber—The additional offset along the cross axis. solidaria-components
shouldFlipfalse | true—Whether the tooltip should flip when there is insufficient room. solidaria-components
delaynumber—The delay time in milliseconds for the tooltip to show up. solid-stately
closeDelaynumber—The delay time in milliseconds for the tooltip to close. solid-stately
isDisabledfalse | true—Whether the tooltip trigger is disabled. solid-stately
defaultOpenfalse | true—Whether the overlay is open by default (uncontrolled). solid-stately
isOpenfalse | true—Whether the overlay is open (controlled). solid-stately
onOpenChange(isOpen: boolean) => void—Handler that is called when the overlay's open state changes. solid-stately
trigger'focus' | 'hover''hover'The trigger mechanism for the tooltip. solidaria
shouldCloseOnPressfalse | truetrueWhether the tooltip should close when the trigger is pressed. solidaria
tooltipIdstring—ID of the tooltip element. solidaria

Declared in packages/viviana-ui/src/tooltip/index.tsx.

Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.