Skip to content

Tooltip - Frameworks

A tooltip is a message box that is displayed when a user hovers over or gives focus to a UI element.

AndroidreleasedElementsreleasediOSreleasedReactreleasedVuereleased

iOS

Syntax

swift
Warp.Tooltip(
    title: String,
    arrowEdge: Edge = .top,
    arrowOffset: CGFloat? = nil // customizable arrow offset from edge
)
swift
Warp.Tooltip(title: "This is a Tooltip")

Visual options

There are a variety of positions supported for the Tooltip component:

swift
enum Edge {
    case top
    case leading
    case bottom
    case trailing
}

Legacy support

By default all Warp components return a SwiftUI View but there is always a UIKit UIView available to use also.

swift
Warp.Tooltip(title: "This is a Tooltip").uiView

Parameters

Required props

NameTypeDefaultDescription
titleStringThe text to be displayed

Optional Props

NameTypeDefaultDescription
arrowEdgeEdge.topThe direction of the arrow. Use one of the predefined Edge values: .top, .leading, .bottom, or .trailing
arrowOffsetCGFloat?nilThe offset of the arrow from the edge. If nil, the arrow will be centered.