Duostrap Button
A button styled with archived Duostrap gradients, pixel metrics, borders, and inset shadows.
Duostrap Button preserves the archived linear gradients, text shadows, borders, and fixed pixel metrics while inheriting activation, keyboard handling, focus, and disabled behavior from Base Button.
Preview
Section titled “Preview”Workspace source
Section titled “Workspace source”This private draft projection is not published on npm, and the installed Proto UI CLI cannot generate its facade. The interactive previews run from workspace source; there is no installed-consumer snippet to copy.
Inside the workspace, use the @proto.ui/prototypes-duostrap/button entry. See the Duostrap README for local build and theme setup.
- Fixed pixel metrics & palette: Preserves Duostrap pixel padding, font sizes, and border radii independent of root font scaling, keeping its classic light palette even in dark hosts.
- Hover motion & accessibility: Applies the classic 100ms linear
background-positionentry transition on hover or focus (resetting immediately on leave and respecting reduced motion). Keyboard activation, focus-visible rings, and disabled semantics come from Base Button.
Examples
Section titled “Examples”Variants
Section titled “Variants”All seven classic Duostrap variants: default, primary, info, success, warning, danger, and inverse.
Four fixed-pixel sizes (large, default, small, and mini), each retaining the 20px line height from v2.3.2.
Navbar context
Section titled “Navbar context”Set colorContext="navbar" for transparent resting commands over a blue or dark navbar surface with translucent hover/press fills and a white focus ring.
With icon
Section titled “With icon”Multiline wrap
Section titled “Multiline wrap”Enable wrap so long labels grow vertically within narrow containers instead of clipping on one line.
Disabled
Section titled “Disabled”Disabled buttons flatten the gradient, drop opacity to 0.65, and suppress pointer and keyboard activation.
| Prop | Type | Default |
|---|---|---|
variant | 'default' 'primary' 'warning' 'danger' 'success' 'info' 'inverse' | default |
size | 'default' 'large' 'small' 'mini' | default |
colorContext | 'default' 'navbar' | default |
wrap | boolean | false |
disabled | boolean | false |