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.
Problem
Tooltip width defaults to screen-width minus margins. No way to:
This makes it hard to achieve tight, compact tooltip compositions that match design specs.
Proposed Solution
Add to
CoachmarkConfigorCoachmarkTarget: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.