Content · Gutenberg
Tooltip block for WordPress
Display a word or phrase with a hover tooltip popup — great for definitions, abbreviations, and inline explanations.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
Display a word or phrase with a hover tooltip popup — great for definitions, abbreviations, and inline explanations.
Inspector panels on this block: Content, Trigger Style, Tooltip Popup. Those titles come from index.js, not from a shared template.
Behavior controls: “Trigger style” options: Dotted underline, Solid underline, Dashed underline, Highlight, Bold; “Text alignment” options: Left, Center, Right; “Position” options: Top, Bottom, Left, Right; “Animation” options: Fade, Scale up, Bounce, Zoom out, Slide down.
Where to find it
Gutenberg inserter → Content → search “Tooltip” (block name `blockenberg/tooltip` in block.json). Style it in the sidebar after insert.
How to use Tooltip block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Tooltip”, insert it. Category: Content.
- Configure inspector controls that exist on this block. Open Content. Set “Trigger Text (visible)”, “Tooltip Content (popup)”, “Trigger style”, “Text alignment”.
- Check the published page. The view script reads HTML data attributes: data-opts, data-rendered. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Trigger Text (visible) | Text field in the inspector. block.json default: Hover over me. Saved as `triggerText`. |
| Tooltip Content (popup) | Multiline text field in the inspector. block.json default: This is the tooltip explanation. Add any helpful context here.. Saved as `tooltipContent`. |
| Trigger style | Select control; the chosen value is saved on the block. Options: Dotted underline; Solid underline; Dashed underline; Highlight; Bold; Italic; None. block.json default: underline-dotted. Saved as `triggerStyle`. |
| Text alignment | Select control; the chosen value is saved on the block. Options: Left; Center; Right. block.json default: left. Saved as `align`. |
| Position | Select control; the chosen value is saved on the block. Options: Top; Bottom; Left; Right. block.json default: top. Saved as `position`. |
| Animation | Select control; the chosen value is saved on the block. Options: Fade; Scale up; Bounce; Zoom out; Slide down; Slide up; Slide left; Slide right; Blur; Flip. block.json default: fade. Saved as `animationType`. |
| Max width (px) | Numeric range control in the inspector. Range 150–480. block.json default: 260. Saved as `maxWidth`. |
| Padding (px) | Numeric range control in the inspector. Range 6–24. block.json default: 12. Saved as `tooltipPadding`. |
| Border radius (px) | Numeric range control in the inspector. Range 0–24. block.json default: 8. Saved as `tooltipRadius`. |
| Show arrow | On/off toggle in the inspector. On by default. Saved as `showArrow`. |
| Trigger Text Color | Color control in the inspector. block.json default: #6366f1. Saved as `triggerColor`. |
| Underline / Accent Color | Color control in the inspector. block.json default: #6366f1. Saved as `underlineColor`. |
| Highlight Background | Color control in the inspector. block.json default: #ede9fe. Saved as `highlightBg`. |
| Tooltip Background | Color control in the inspector. block.json default: #1e293b. Saved as `tooltipBg`. |
| Tooltip Text Color | Color control in the inspector. block.json default: #f8fafc. Saved as `tooltipColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts, data-rendered.
- Keyboard handlers move focus between items.
When this is the right block
- Display a word or phrase with a hover tooltip popup — great for definitions, abbreviations, and inline explanations — that is the job of Tooltip, not a generic content block.
- Use it when you need the editor control labeled “Trigger Text (visible)”, which exists on this block’s inspector.
- It matches pages about tooltip, popover, hint.
- Inserter grouping: articles, cards, lists, and long-form layouts.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Tooltip block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Tooltip”. It sits under Content. After insert, open Content and set “Trigger Text (visible)”, “Tooltip Content (popup)”, “Trigger style”, “Text alignment”.
What makes Tooltip different from other Blockenberg blocks?
Display a word or phrase with a hover tooltip popup — great for definitions, abbreviations, and inline explanations. Inspector labels on this block include “Trigger Text (visible)”, “Tooltip Content (popup)”, “Trigger style”, “Text alignment”.
Is the Tooltip Gutenberg block free?
Yes. Tooltip ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Tooltip to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Content, Trigger Style, Tooltip Popup).
Related content blocks
Alert / Notice
Info, success, warning or error notice block with icon, title and body text. Pure CSS — zero JS.
Callout
Highlighted panel for tips, warnings or success messages with icon, title and dismissible option.
Content Box
Styled content container with optional icon/emoji, badge label, title, rich body text, style variants (info/warning/success/tip/quote), border, background, and rounded corners.
Definition Block
Dictionary-style term definition with pronunciation, part of speech, examples and synonyms.
Info Cards
Flexible feature/info card grid with emoji or image icons, title, description, optional CTA and accent colors. Multiple card styles.
Accordion
Collapsible accordion panels for FAQ, features, and more.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Tooltip from the Gutenberg inserter.