Skip to main content

button

Props​

PropertyAttributeDescriptionTypeDefault
statestate"danger" | "default" | "ghost" | "info" | "primary" | "success" | "warning""default"
disableddisabledbooleanfalse
iconiconstring""
loadingloadingbooleanfalse
selectedselectedbooleanfalse
sizesize"large" | "medium" | "small""medium"
suffixIconsuffix-iconstring""
statestate"default" | "neo" | "outline" | "solid" | "text""default"

Events​

EventDescriptionType
buttonClickCustomEvent<{ event: MouseEvent; selected: boolean; }>

1. Basic buttons (default state)​

Shows a minimalist button with an appearance that can be adjusted based on size, state and state.

Primary Button

2. Buttons of different colours​

Displays buttons in different colours, covering primary, success, info, warning, danger, and ghost.

primarysuccessinfowarningdangerghost

3. Buttons of different sizes demonstrate the different effects of the​

size attribute. You can use small, medium, and large to demonstrate different button sizes.

small Buttonmedium ButtonLarge Button

4. Buttons with icons​

Displays buttons with icons. Use the icon,suffix-icon attributes to add prefix and suffix icons to buttons.

图标按钮后缀图标按钮双图标按钮

5. Different styles of buttons​

show how buttons look when they are in button style mode, using the solid, outline, text, neo, and default attributes.

solidoutlinetext

6. Loading, disabled, selected state display​

Display buttons in the loading, disabled, or selected state using the loading, disabled, icon, selected, and other attributes.

loadingdisablediconselectedselected