Skip to content

Button

Interactive control for actions, with multiple style variants and states.

Examples

Button types

DefaultPrimaryWarn

Button types

Three base types: default / primary / warn

Size and plain

MiniPlainWarn Plain

Size and plain

`size` controls size; `plain` enables the outlined style

Disabled and loading

DisabledLoading

Disabled and loading

API

Props

属性说明类型默认值
typeVisual style of the buttondefault | primary | warndefault
sizeButton sizedefault | minidefault
plainWhether the button is outlinedbooleanfalse
disabledWhether the button is disabledbooleanfalse
loadingWhether to show a loading statebooleanfalse
hover-classCSS class while pressedstringbutton-hover
hover-start-timeDelay after press before pressed style appears (ms)number20
hover-stay-timeHow long pressed style remains after release (ms)number70
form-typeForm action type (must be inside m-form)submit | reset-

MiniDev Studio — Mini-app Development Toolkit