# Button ## Demos ### Stylistic variants Available style variants for the [`ui`](#props-ui) prop: `primary` / `strong` / `translucent` / `text` / `icon`. [[ demo src="/demo/button/style.vue" ]] ### Size variants Available size variants for the [`ui`](#props-ui) prop: `xs` / `s` / `m` / `l` / `xl`. [[ demo src="/demo/button/size.vue" ]] ### Disabled state Use the [`disabled`](#props-disabled) prop to set a button to disabled state. [[ demo src="/demo/button/disabled.vue" ]] ### Loading state Use the [`loading`](#props-loading) prop to set a button to loading state (which will not respond upon clicks). [[ demo src="/demo/button/loading.vue" ]] ## API ### Props | Name | Type | Default | Description | | -- | -- | -- | -- | | ``ui`` | `string=` | - | [^ui] | | ``disabled`` | `boolean=` | `false` | Whether the button is disabled. | | ``type`` | `string=` | `'button'` | [^type] | | ``loading`` | `boolean=` | `false` | Whether the button is in loading state. Loading buttons won't respond to user interactions. | ^^^ui Style variants. A space-separated list of enum values. +++Enum values | Value | Description | | -- | -- | | `normal` | Normal button. Default style. | | `primary` | Primary button. | | `basic` | Basic button. | | `strong` | Strong button. Can be used alone or together with `text` / `icon`. | | `translucent` | Translucent button, typically used on dark background. | | `text` | Text button. | | `icon` | Icon button. | | `aux` | Auxilary button. Need to be used with `text` / `icon` styles. | | `square` | Square button. Can be used with other styles. | | `xs` | Extra small. | | `s` | Small. | | `m` | Medium. | | `l` | Large. | | `xl` | Extra large. | +++ ^^^ ^^^type The type of the button. See the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-type) attribute of HTML's native `