• Docs
  • Blog
    • 0.24.0

    • Switch to dark mode
    Get Started
    Components
    Styling
    Theming

    Concepts

    OverviewCompositionTesting

    Layout

    Aspect RatioBleedBoxCenterContainerDividerFlexFloatGridLink OverlayScrollableStackWrap

    Components

    AccordionAdmonitionAvatarButtonCarouselCheckboxClipboardCollapsibleComboboxConfirm ModalCTAModalDate PickerDialogFieldFieldsetFile UploaderIcon ButtonInputLoading StatesMenuNotificationsNumber InputPin InputProgressPrompt ModalRadioRatingSelectSplit ButtonSwitchTableTabsTagTextTextareaToggleTooltip

    Utilities

    Feature FlagsForLocal StoragePortalShowsplitPropsTheme

    Tooltip

    A small pop-up box that appears when a user hovers over an element.

    • npm
    • source
    • recipe
    • Ark
    import { Tooltip } from '@cerberus/react'

    Usage

    Get information from something that has a very long description.

    Positioning

    You can position the tooltip relative to the target element using the position prop.

    Top position
    Right position
    Bottom position
    Left position

    Primitives

    You can utilize the primitive components or the css prop to customize the checkbox.

    ComponentDescription
    TooltipRootThe context provider for the Tooltip parts
    TooltipTriggerThe focusable element that triggers the tooltip on hover
    TooltipPositionerThe positioning container for the tooltip
    TooltipContentThe content of the tooltip
    TooltipArrowThe arrow container of the tooltip bubble
    TooltipArrowTipThe tip of the arrow

    API

    Props

    The Tooltip component is an abstraction of the primitives and accepts the following props:

    NameDefaultDescription
    contentWhat to display in the Tooltip.

    The Tooltip component also accepts all the props of the TooltipRoot primitive props

    Parts

    The TooltipParts API is an Object containing the full family of components.

    Note

    It is best to only use the TooltipParts if you are building a custom solution. Importing Object based components will ship every property it includes into your bundle, regardless if you use it or not.

    NameDescription
    RootThe TooltipRoot component.
    TriggerThe TooltipTrigger component.
    PositionerThe TooltipPositioner component.
    ContentThe TooltipContent component.
    ArrowThe TooltipArrow component.
    ArrowTipThe TooltipArrowTip component.

    On this page

    • Edit this page on Github
    Cerberus Design System | Docs