Button

To trigger an operation.

When To Use#

A button means an operation (or a series of operations). Clicking a button will trigger corresponding business logic.

In Ant Design we provide 4 types of button.

  • Primary button: indicate the main action, one primary button at most in one section.
  • Default button: indicate a series of actions without priority.
  • Dashed button: used for adding action commonly.

And 4 other properties additionally.

  • danger: used for actions of risk, like deletion or authorization.
  • ghost: used in situations with complex background, home pages usually.
  • disabled: when actions are not available.
  • loading: add loading spinner in button, avoiding multiple submits too.

Examples

Type
There are "primary", "default", "dashed", "text" and "link" buttons in Elm Antd.
Icon
Button components can contain an Icon
Disabled
You can disable any button