Launch Week Day 2: Introducing Reports: An Extensible Reporting Framework for Socket Data.Learn More
Socket
Book a DemoSign in
Socket

@contentful/f36-tooltip

Package Overview
Dependencies
Maintainers
4
Versions
403
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/f36-tooltip

Forma 36: Tooltip component

latest
Source
npmnpm
Version
6.7.2
Version published
Weekly downloads
65K
14.13%
Maintainers
4
Weekly downloads
 
Created
Source

title: 'Tooltip' type: 'component' status: 'stable' slug: /components/tooltip/ github: 'https://github.com/contentful/forma-36/tree/main/packages/components/tooltip' storybook: 'https://f36-storybook.contentful.com/?path=/story/components-tooltip--basic' typescript: ./src/Tooltip.tsx

Tooltips are very useful to communicate extra information related to an element on the screen. The information should be contextual, useful, and nonessential.

Import

import { Tooltip } from '@contentful/f36-components';
// or
import { Tooltip } from '@contentful/f36-tooltip';

Examples

Button with tooltip

Tooltips in Text

Tooltip without wrapper (withTriggerWrapper={false})

  • Use withTriggerWrapper={false} to avoid rendering an additional wrapper element around the trigger.
  • withTriggerWrapper={false} requires a single valid React element as children.
  • as and targetWrapperClassName only apply when the trigger wrapper is enabled.
  • If the trigger element is disabled, the tooltip will not be shown on hover in this mode.

Props (API reference)

Content guidelines

  • Use short and clear messages as the Tooltip’s content
  • The Tooltip component allows you to pass React elements as content. However, this should be used with care. ReactElement as content is best suited for text formatting purposes. It should not be used for interactive elements like links, buttons, or form elements. Additionally, extensive images should be avoided, except for text-decorator icons that give semantic meaning to the text shown in the tooltip (e.g., warning signs or other relevant icons).
    • When using ReactElement as the content, it's recommended to use the ScreenReaderOnly component when displaying critical information.

Accessibility

  • Do not put essential information in Tooltip component
  • Add unique id property to the tooltip, so appropriate a11y attributes could be used.
<Tooltip placement="top" id="tooltip" content="Hi I am a Tooltip">
  <TextLink>Hover me</TextLink>
</Tooltip>

FAQs

Package last updated on 21 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts