Skip to content

Tooltip width and placement fine-tuning #37

@aldefy

Description

@aldefy

Problem

Tooltip width defaults to screen-width minus margins. No way to:

  • Set a specific max width
  • Control horizontal alignment relative to the cutout (leading edge, centered, trailing edge)
  • Set custom margins per-target

This makes it hard to achieve tight, compact tooltip compositions that match design specs.

Proposed Solution

Add to CoachmarkConfig or CoachmarkTarget:

CoachmarkTarget(
    id = "target",
    tooltipMaxWidth = 280.dp,          // Cap tooltip width
    tooltipAlignment = TooltipAlignment.LEADING_EDGE, // Align to cutout's leading edge
    tooltipMargin = PaddingValues(horizontal = 24.dp),
)

Context

Client feedback: tooltip feels disconnected from cutout. Figma shows a compact tooltip close to the target, but the app renders a wide tooltip far below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestv1.3Version 1.3 milestone

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions