Shopware Design

Button

Source

Usage

Button triggers a clear user action such as saving, creating, confirming, or moving to the next step. Use the variant to communicate action hierarchy and intent, and the size to fit the surrounding layout without changing what the action means.

import { MtButton } from "@shopware-ag/meteor-component-library";

Examples

Variants

Each variant signals a different level of emphasis and intent.

Sizes

Match the button size to the surrounding layout without changing the meaning of the action.

With icon

Add an icon in the front or back slot to reinforce the action.

Icon only

Use square and an aria-label for a compact, icon-only control.

States

API reference

Props

PropTypeDefault
isstring | Component"button"
disabledboolean
variant"critical" | "action" | "primary" | "secondary" | "tertiary""secondary"
ghostboolean
size"default" | "small" | "x-small" | "large""small"
squareboolean
blockboolean
linkstringundefined
is-loadingboolean

Slots

SlotBindings
defaultany
iconFrontany
iconBackany

Best practices

Do
  • Keep button labels short, specific, and action-oriented.
  • Use primary for the main action in a local context.
  • Use secondary or tertiary for supporting actions.
  • Use critical only for destructive or high-risk actions.
  • Use square when you render an icon-only button so the control stays visually balanced.
Don't
  • Do not use multiple primary buttons in the same local action group.
  • Do not use vague labels such as Submit or Continue when a clearer verb would help.
  • Do not rely on color alone to explain what a button will do.
  • Do not use Button for purely navigational inline text links.

Behavior

  • Button supports visual hierarchy through variants, but the label still carries the main meaning of the action.
  • Loading and disabled states should be used to prevent duplicate actions or indicate temporary unavailability.
  • The icon slots are optional enhancements. For icon-only buttons, use square and provide an accessible name.

Accessibility

  • Button text should clearly describe the action without depending on surrounding context alone.
  • If you use only an icon visually, ensure the button still has an accessible name.
  • Icon-only buttons are valid, but they should use the square prop and a clear accessible label such as aria-label.
  • Disabled and loading buttons should be used intentionally so people understand why the action is unavailable.
  • Link: when the user is moving to another page, route, or destination.