Skip to main content

Starwind UI v3.0 beta is now available! Read the migration guide

Installation

Framework Availability

Astro Available React Available

Tooltip is available for Astro and React.

Usage

Positioning

Control the position and alignment of the tooltip using the side and align props.

Delay

Customize the open and close delay using the openDelay and closeDelay props.

Alignment

Control the alignment of the tooltip relative to its trigger using the align prop.

API Reference

Styled Component API

These props are added or materially changed by the installed Astro styled component. Standard HTML attributes remain available through the inherited interfaces noted below. Follow the Primitive and Runtime links for lower-level behavior props.

Tooltip Trigger

Inherits span attributes.

Contains the following additional props:

Prop Type Default Toggle details
asChild boolean true
Description
Merges the component behavior and props into its child element.
Classification
Primitive override
Primitive prop
tooltip.Trigger.asChild

Primitive And Runtime API

Use these references when you need the lower-level behavior APIs behind Tooltip.

Primitive API

Runtime API

Tooltip primitive
createTooltip from @starwind-ui/runtime/tooltip

Changelog

v2.0.0

  • Rebuilt Tooltip on Starwind Runtime for hover and focus timing, floating placement, and dismissal.
  • See the Tooltip Primitive for the underlying unstyled anatomy and behavior API.