remix/ui/button
button is the shared button styling contract for remix/ui. Use Button for ordinary action buttons, or compose flat button.*Style exports directly when a higher-level control needs button structure without a wrapper.
Usage
import { Button } from 'remix/ui/button'
import * as button from 'remix/ui/button'
import { Glyph } from 'remix/ui/glyph'
function Actions() {
return (
<div>
<Button startIcon={<Glyph name="add" />} tone="primary">
Create project
</Button>
<a href="/projects" mix={[button.baseStyle, button.secondaryStyle]}>
<span mix={button.labelStyle}>View projects</span>
<Glyph mix={button.iconStyle} name="chevronRight" />
</a>
</div>
)
}button.*
Button: thin button wrapper for the commonbase + tone + label/icon slotscase. Passtone,startIcon, andendIconwhen the default authored structure is enough.button.baseStyle: base host styling plus the defaulttype="button"behavior for button elements.button.primaryStyle,button.secondaryStyle,button.ghostStyle, andbutton.dangerStyle: visual button treatments.button.labelStyle: inline label slot with the standard button spacing.button.iconStyle: icon slot sizing andaria-hiddendefaults for decorative icons.
Behavior Notes
button.baseStyleonly addstype="button"when the host element is a<button>and no explicittypewas provided.Buttonrenderschildreninsidebutton.labelStyleand rendersstartIconandendIconinsidebutton.iconStyle.- Use an explicit accessible name when you render an icon-only button.
When To Use Something Else
Use button.*Style exports directly when a control needs button structure plus extra behavior or layout, like select, menu, or tabs. Those controls own their own interaction mixins and should not hide that behavior behind Button.