Appearance
Button
EBtn
comes in various colors and designs and enables users to trigger an activity with just one press. Demo Here
Usage
vue
<EBtn>Im a Button</EBtn>
Props
For EBtn
component, the following props are available:
Prop | Type | Default | Note |
---|---|---|---|
disabled | Boolean | false | Disables the btn. |
type | String | "button" | Html type attribute. |
loading | Boolean | false | Displays progress bar. |
active | Boolean | false | Creates an activated button. |
rounded | Boolean | false | It creates a circular btn. |
square | Boolean | false | Removes rounded corners of the element. |
width | String | - | Sets the component's width. |
height | String | - | Sets the component's height. |
href | String | - | This attribute creates a linked btn. |
to | [String, Object] | - | This attribute creates a linked btn. |
target | String | "_self" | It specifies where to open the linked document. _self opens the linked document in the same frame as it was clicked. |
size | String | "md" | The EBtn element has three predefined sizes: sm , md , lg . |
block | Boolean | false | The EBtn element expands to take up all of the available space. |
customColor | String | - | A custom color in rgb format is applied to the btn (e.g, customColor="101, 89, 204"). |
spinner | String | "beat" | Specify Spinner element. @values: beat , clip , moon , bounce . |
color | String | "primary" | The given color is applied to the btn - utility colors are supported (e.g primary or danger ). you'll find a list of built-in classes on the src/styles/_vars.scss page. |
iconBtn | Object | - | By using iconBtn prop the EBtn element will be visualized in an Icon form. More Info about icons here. |
appendIcon | Object | - | Inserts a custom EIcon element to the btn that is located after the content. More Info here. |
prependIcon | Object | - | Inserts a custom EIcon element to the btn that is located before the content. More Info here. |
variant | String | "fill" | The EBtn element can be represented in two ways: fill , alternate , outline ,text . alternate displays the btn with a light background, outline draws a border around an element and text displays the btn with only text and no background color. |
Emits
The EBtn
component contains following emits.
Emit | Description |
---|---|
click | Emits click event. |
Slots
The EBtn
component provides a default slot that enable you to customize the content.
Slot | Description |
---|---|
default | The default Vue slot. |