Duostrap Tooltip
A classic Duostrap tooltip featuring 11px white text on a 200px max-width black pill with a 150ms linear opacity fade.
Duostrap Tooltip preserves the archived #000 / #fff compact bubble (max-width: 200px, 8px padding, 4px radius, 11px type) and 150ms linear fade (0 → 0.8 opacity), backed by Base Tooltip timing, focus, and accessibility semantics.
Preview
Section titled “Preview”<wc-duostrap-tooltip-group class="flex items-center gap-3">
<wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-trigger>
Account
</wc-duostrap-tooltip-trigger>
<wc-duostrap-tooltip-content side="top">
View account settings
</wc-duostrap-tooltip-content>
</wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-trigger>
Notifications
</wc-duostrap-tooltip-trigger>
<wc-duostrap-tooltip-content side="top">
Manage notification preferences
</wc-duostrap-tooltip-content>
</wc-duostrap-tooltip-root>
</wc-duostrap-tooltip-group>Installation
Section titled “Installation”Duostrap Tooltip is available from workspace source via @proto.ui/prototypes-duostrap/tooltip (tooltipGroup, tooltipRoot, tooltipTrigger, tooltipContent) for use with any Proto UI host adapter.
import { BootstrapTooltipGroup, BootstrapTooltipRoot, BootstrapTooltipTrigger, BootstrapTooltipContent,} from '../proto-ui/components/react';
export function Example() { return ( <BootstrapTooltipGroup> <BootstrapTooltipRoot> <BootstrapTooltipTrigger>Account</BootstrapTooltipTrigger> <BootstrapTooltipContent side="top">View account settings</BootstrapTooltipContent> </BootstrapTooltipRoot> </BootstrapTooltipGroup> );}Composition
Section titled “Composition”TooltipGroup (optional)└── TooltipRoot ├── TooltipTrigger └── TooltipContentGroupcoordinates cold hover delay (700ms), close delay (100ms), and warm sibling handoff (300ms).Triggerremains chromeless with a classic focus outline;Tabfocus opens immediately andEscapedismisses while preserving trigger focus.Contentrenders in a portal with automaticaria-describedby/role="tooltip"wiring and disables transitions when reduced motion is preferred.
Examples
Section titled “Examples”Use the side prop on Content to display the tooltip on left, top, bottom, or right.
<wc-duostrap-tooltip-group class="flex flex-wrap gap-2">
<wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-trigger>Left</wc-duostrap-tooltip-trigger>
<wc-duostrap-tooltip-content side="left">
Add to library
</wc-duostrap-tooltip-content>
</wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-trigger>Top</wc-duostrap-tooltip-trigger>
<wc-duostrap-tooltip-content side="top">
Add to library
</wc-duostrap-tooltip-content>
</wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-trigger>
Bottom
</wc-duostrap-tooltip-trigger>
<wc-duostrap-tooltip-content side="bottom">
Add to library
</wc-duostrap-tooltip-content>
</wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-trigger>Right</wc-duostrap-tooltip-trigger>
<wc-duostrap-tooltip-content side="right">
Add to library
</wc-duostrap-tooltip-content>
</wc-duostrap-tooltip-root>
</wc-duostrap-tooltip-group>With Keyboard Shortcut
Section titled “With Keyboard Shortcut”Display a brief action label alongside an inline keyboard shortcut badge.
<wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-trigger>Save</wc-duostrap-tooltip-trigger>
<wc-duostrap-tooltip-content side="top">
Save Changes
<kbd>S</kbd>
</wc-duostrap-tooltip-content>
</wc-duostrap-tooltip-root>Disabled Button
Section titled “Disabled Button”Wrap a disabled button inside Trigger so hovering or focusing still reveals why the control is disabled.
<wc-duostrap-tooltip-root>
<wc-duostrap-tooltip-trigger class="inline-block w-fit">
<button type="button" disabled>Disabled</button>
</wc-duostrap-tooltip-trigger>
<wc-duostrap-tooltip-content side="top">
This feature is currently unavailable
</wc-duostrap-tooltip-content>
</wc-duostrap-tooltip-root>| Prop | Type | Default |
|---|---|---|
openDelay | number | 700 |
closeDelay | number | 100 |
skipDelay | number | 300 |
Pass open for controlled mode. Root inherits Group delays unless overridden.
| Prop | Type | Default |
|---|---|---|
open | boolean | undefined |
defaultOpen | boolean | false |
disabled | boolean | false |
openDelay | number | undefined |
closeDelay | number | undefined |
Trigger
Section titled “Trigger”| Prop | Type | Default |
|---|---|---|
disabled | boolean | false |
Content
Section titled “Content”| Prop | Type | Default |
|---|---|---|
side | 'top' 'right' 'bottom' 'left' | 'top' |
align | 'start' 'center' 'end' | 'center' |
sideOffset | number | 4 |
alignOffset | number | 0 |
avoidCollisions | boolean | true |
collisionPadding | number | 0 |
enterDuration | number | 150 |
leaveDuration | number | 150 |
Events, States & Methods
Section titled “Events, States & Methods”- Root: Exposes read-only state
open, eventopenChange({ open, reason }), and methodsopenTooltip(reason?),close(reason?),toggle(reason?). - Trigger: Exposes read-only states
disabled,hovered,focused,focusVisible, and methodfocusSelf(options?). - Content: Exposes read-only state
openand Transition handles (transitionState,isPresent,controls).