Skip to content

Button ​

Button and button group components with seven variants, six semantic colors, three sizes, icon slots, link mode, and animated border effects.

Variants ​

Seven variants cover the full range of visual emphasis.

PreviewCode
RTL
html
<ore-button variant="solid">Solid</ore-button>
<ore-button variant="flat">Flat</ore-button>
<ore-button variant="bordered">Bordered</ore-button>
<ore-button variant="outline">Outline</ore-button>
<ore-button variant="ghost">Ghost</ore-button>
<ore-button variant="text">Text</ore-button>
<ore-button variant="frost">Frost</ore-button>

Colors ​

Six semantic colors communicate intent.

PreviewCode
RTL
html
<ore-button variant="bordered">Default</ore-button>
<ore-button variant="bordered" color="primary">Primary</ore-button>
<ore-button variant="bordered" color="secondary">Secondary</ore-button>
<ore-button variant="bordered" color="info">Info</ore-button>
<ore-button variant="bordered" color="success">Success</ore-button>
<ore-button variant="bordered" color="warning">Warning</ore-button>
<ore-button variant="bordered" color="error">Error</ore-button>

Sizes ​

PreviewCode
RTL
html
<ore-button size="sm">Small</ore-button>
<ore-button size="md">Medium</ore-button>
<ore-button size="lg">Large</ore-button>
<ore-button size="sm" icon-only label="Search">
  <ore-icon name="search"></ore-icon>
</ore-button>
<ore-button size="md" icon-only label="Search">
  <ore-icon name="search"></ore-icon>
</ore-button>
<ore-button size="lg" icon-only label="Search">
  <ore-icon name="search"></ore-icon>
</ore-button>

States ​

Loading ​

Renders a spinner and blocks interaction during async operations.

PreviewCode
RTL
html
<ore-button loading>Loading...</ore-button>

Disabled ​

PreviewCode
RTL
html
<ore-button disabled>Disabled</ore-button>

Icons ​

Use prefix and suffix slots to add icons alongside text. For icon-only buttons, use icon-only with a label attribute: the label is set as aria-label and is required for accessibility.

PreviewCode
RTL
html
<ore-button>
  <ore-icon slot="prefix" name="arrow-left"></ore-icon>
  Back
</ore-button>
<ore-button color="success">
  Save
  <ore-icon slot="suffix" name="save"></ore-icon>
</ore-button>
<ore-button icon-only label="Delete" color="error">
  <ore-icon name="trash-2"></ore-icon>
</ore-button>

Rounded ​

The rounded attribute sets the border radius from the theme scale. Used without a value (or with "full") it produces a pill shape.

PreviewCode
RTL
html
<ore-button rounded>Pill</ore-button>
<ore-button rounded="lg">Large</ore-button>
<ore-button rounded="xl">XL</ore-button>
<ore-button rounded="2xl">2XL</ore-button>
<ore-button rounded icon-only label="Check">
  <ore-icon name="check"></ore-icon>
</ore-button>

Full Width ​

PreviewCode
RTL
html
<ore-button fullwidth>Full Width</ore-button>
<ore-button fullwidth variant="bordered" color="success">Full Width Bordered</ore-button>

Full Height ​

fullheight fills the button's own container height instead of its size preset's fixed height : useful when the button itself is the whole tappable surface of a space it doesn't otherwise control the size of, such as a swipe-revealed row action in ore-list-item's actions-left/actions-right slots.

PreviewCode
RTL
html
<div style="display: flex; height: 4rem; gap: 0.5rem;">
  <ore-button fullheight color="primary">Full Height</ore-button>
  <ore-button color="secondary">Default Height</ore-button>
</div>

Set href to render a real, focusable <a> internally. The native anchor owns link semantics, keyboard behavior, context menus, and hover previews; the custom-element host remains a styling and property boundary. All variants, sizes, states, and slots behave identically.

PreviewCode
RTL
html
<ore-button href="#">Default Link</ore-button>
<ore-button href="#" variant="outline">Outline Link</ore-button>
<ore-button href="#" target="_blank" rel="noopener noreferrer" variant="ghost">
  Open in new tab
  <ore-icon slot="suffix" name="external-link"></ore-icon>
</ore-button>

Security

Always set rel="noopener noreferrer" when using target="_blank" to prevent tabnapping.

Animated Border Effects ​

The effect attribute adds an animated border. Both effects pause automatically when the user has prefers-reduced-motion enabled.

Rainbow ​

An Okabe-Ito colorblind-safe color sweep: good for highlighting a primary call-to-action.

PreviewCode
RTL
html
<ore-button effect="rainbow" variant="frost">Frost + Rainbow</ore-button>

Shine ​

A neon comet that sweeps the border using the button's own color token.

PreviewCode
RTL
html
<ore-button effect="shine" color="primary">Primary</ore-button>
<ore-button effect="shine" color="secondary">Secondary</ore-button>
<ore-button effect="shine" color="success">Success</ore-button>
<ore-button effect="shine" color="warning">Warning</ore-button>
<ore-button effect="shine" color="error">Error</ore-button>
<ore-button effect="shine" variant="outline" color="primary" rounded>Outline</ore-button>
<ore-button effect="shine" variant="bordered" color="secondary">Bordered</ore-button>
<ore-button effect="shine" variant="frost" color="info">Frost</ore-button>

Button Groups ​

Basic ​

PreviewCode
RTL
html
<ore-button-group>
  <ore-button>Left</ore-button>
  <ore-button>Center</ore-button>
  <ore-button>Right</ore-button>
</ore-button-group>

Vertical ​

PreviewCode
RTL
html
<ore-button-group orientation="vertical">
  <ore-button>Top</ore-button>
  <ore-button>Middle</ore-button>
  <ore-button>Bottom</ore-button>
</ore-button-group>

Attached ​

Removes spacing and connects buttons with shared borders: use for segmented controls.

PreviewCode
RTL
html
<ore-button-group attached>
  <ore-button variant="bordered">Day</ore-button>
  <ore-button variant="solid">Week</ore-button>
  <ore-button variant="bordered">Month</ore-button>
</ore-button-group>

Attribute Propagation ​

size, variant, and color set on the group apply to all child buttons automatically.

PreviewCode
RTL
html
<ore-button-group variant="outline" size="sm" color="secondary">
  <ore-button>Button 1</ore-button>
  <ore-button>Button 2</ore-button>
  <ore-button>Button 3</ore-button>
</ore-button-group>

Full Width ​

PreviewCode
RTL
html
<ore-button-group fullwidth attached>
  <ore-button variant="bordered">Option A</ore-button>
  <ore-button variant="bordered">Option B</ore-button>
</ore-button-group>

API Reference ​

ore-button Attributes ​

AttributeTypeDefaultDescription
variant'solid' | 'flat' | 'bordered' | 'outline' | 'ghost' | 'text' | 'frost''solid'Visual style
color'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error'N/ASemantic color; uncolored neutral when omitted
size'sm' | 'md' | 'lg''md'Button size
type'button' | 'submit' | 'reset''button'HTML button type for form association
disabledbooleanfalseDisables the button
loadingbooleanfalseShows spinner; also disables interaction
effect'shine' | 'rainbow'N/AAnimated border effect
icon-onlybooleanfalseSquare aspect ratio, no padding: pair with label
labelstringN/ASets the accessible label: required for icon-only buttons
fullwidthbooleanfalseExpands to full container width
fullheightbooleanfalseExpands to full container height (see List's swipe actions)
rounded'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full'N/ABorder radius; omit value or use 'full' for pill shape
hrefstringN/ARenders a native, focusable <a> internally
target'_blank' | '_self' | '_parent' | '_top'N/ALink target (requires href)
relstringN/ALink rel attribute (requires href)

ore-button-group Attributes ​

AttributeTypeDefaultDescription
orientation'horizontal' | 'vertical''horizontal'Layout direction
attachedbooleanfalseRemoves spacing and connects buttons with borders
fullwidthbooleanfalseButtons expand equally to fill container
labelstringN/Aaria-label for the group container
size'sm' | 'md' | 'lg'N/APropagated to all child buttons
variant'solid' | 'flat' | 'bordered' | 'outline' | 'ghost' | 'text' | 'frost'N/APropagated to all child buttons
color'primary' | 'secondary' | 'info' | 'success' | 'warning' | 'error'N/APropagated to all child buttons

Slots ​

ore-button

SlotDescription
(default)Button label, text, or content
prefixContent before the label
suffixContent after the label

ore-button-group

SlotDescription
(default)Child button elements

Events ​

ore-button fires the native click (MouseEvent) event. No custom events.

ore-button-group fires no events.

CSS Parts ​

ore-button

PartElement
buttonThe inner <button> or <a> element
loaderThe loading spinner
contentThe text/content wrapper

ore-button-group

PartElement
groupGroup container

CSS Custom Properties ​

ore-button

PropertyDescriptionDefault
--button-bgBackground colorVariant-dependent
--button-colorText colorVariant-dependent
--button-borderBorder widthvar(--border)
--button-border-colorBorder colorVariant-dependent
--button-border-topTop border width (used by attached groups)N/A
--button-border-startInline-start border width (used by attached groups)N/A
--button-radiusBorder radiusvar(--rounded-lg)
--button-paddingInner paddingSize-dependent
--button-gapGap between icon and textSize-dependent
--button-font-sizeFont sizeSize-dependent
--button-frost-active-bgBackground when hovered/pressed in frost variantVariant-dependent
--button-frost-active-border-colorBorder color when hovered/pressed in frost variantVariant-dependent

ore-button-group

PropertyDescriptionDefault
--group-gapSpacing between buttons (non-attached)var(--size-2)
--group-radiusBorder radius on first/last buttons in attached modevar(--rounded-lg)

Accessibility ​

Keyboard: Enter and Space activate the button. Tab moves focus in and out.

Screen readers: The button role and label are announced automatically. aria-disabled is set when disabled; aria-busy when loading.

Icon-only buttons: The label attribute is required: it becomes the aria-label. Without it, screen readers have nothing to announce.

Button groups: The container gets role="group" automatically. Set the label attribute on the group when the purpose isn't clear from the button labels alone (e.g., label="Text alignment").