Tooltip
Tooltip is a contextual overlay that appears on hover (or focus) to provide brief help or explanations.
Use tooltips for:
-
icon-only buttons
-
dense toolbars
-
exposing extra detail without cluttering the UI
Tooltips should be short, readable, and optional.
Quick start
import bootstack as bs
app = bs.App()
btn = bs.Button(app, text="Refresh")
btn.pack(padx=20, pady=20)
bs.Tooltip(btn, text="Reload the current view")
app.mainloop()
When to use
Use Tooltip when:
-
the control meaning isn't obvious (especially icon-only UI)
-
you want "learnable" UI without permanent labels
Consider a different control when...
-
the text is essential to completing the task — use labels or inline help
-
you need to show notifications or feedback — use Toast
Appearance
Variants
Tooltips can be styled using the accent parameter (if supported).
Design System
See the Colors & Styling guide for complete color options.
Examples & patterns
Common options
-
text— the tooltip content -
delay— time before showing (in milliseconds) -
wraplength— max line width for text wrapping -
accent— visual style (if supported)
Behavior
-
Appears on hover (and optionally focus)
-
Disappears on leave or after a delay
-
Should not steal focus or block interaction
Additional resources
Related widgets
-
Toast — non-blocking notifications
-
MessageBox — blocking alerts and confirmations
Framework concepts
- Widgets — overview of all widgets