Button#

Github

Button is a user interface element typically used to trigger some action or event. Users can click the button to perform specific functions, such as submitting a form, launching a program, or navigating to other pages. Buttons usually appear in rectangular or circular shapes and can contain text, icons, or a combination of both.

Basic#

Types#

There are 5 types of buttons: Primary Button, Classic Button, Secondary Button, Tertiary Button, Ghost Button. type

Composition Elements#

Buttons are typically composed of text/icons. The text/icons form the display content of the button, which can appear alone or in combination. element

  1. Icon
  2. Text
  3. Shortcut

According to the combination method, there are the following combinations: layout

  1. Text-only Button
  2. Left Icon + Text
  3. Right Icon + Text
  4. Icon-only Button

Shortcuts#

Each button has a combination key that can be triggered directly through keyboard mode. shortcut

Interaction States#

Different types of buttons have five states: Default, Disabled, Hover, Focus and Active. state

Sizes#

All button types have three sizes: Medium, Small, and Extra Small. size

Usage#

When to Use#

In Wis, buttons are mostly used within containers/components and follow the rules of their respective containers/components. When conditions permit, they can be used for custom functions. Within a container, there is usually a fixed Action area to hold buttons; different containers will have different corresponding rules for the type and number of container buttons. demo-1