Skip to content

Button

EBtn comes in a range of colors and designs and enables users to trigger an activity with just one press. Demo Here

Import

jsx
import EBtn from "@components/Elements/EBtn";

Usage

jsx
<EBtn>Im a Button</EBtn>

Props

For EBtn component, the following props are available:

PropTypeDefaultNote
disabledBooleanfalseDisables the btn.
typeString"button"Html type attribute.
loadingBooleanfalseDisplays progress bar.
activeBooleanfalseCreates an active button.
roundedBooleanfalseIt creates a circular btn.
squareBooleanfalseRemoves rounded corners of the element.
width[String, Number]-Sets the component's width. Default unit is px.
height[String, Number]-Sets the component's height. Default unit is px.
hrefString-This attribute creates a linked btn.
toString-This attribute creates a linked btn.
targetString"_self"It specifies where to open the linked document. _self opens the linked document in the same frame as it was clicked.
classNameString-Overrides or extends the component's styles.
sizeString"md"The EBtn element has three predefined sizes: sm, md, lg.
blockBooleanfalseThe EBtn element expands to take up all of the available space.
customColorString-A custom color in rgb format is applied to the btn (e.g, customColor="101, 89, 204").
spinnerString"beat"Specify Spinner element. @values: beat, clip, moon, bounce .
colorString"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.scsspage.
iconBtnObject-By using iconBtn prop the EBtn element will be visualized in an Icon form. More Info about icons here.
appendIconObject-Inserts a custom EIcon element to the btn that is located after the content. More Info here.
prependIconObject-Inserts a custom EIcon element to the btn that is located before the content. More Info here.
variantString"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.

Callback Functions

The EBtn component contains following callback functions.

FunctionDescription
onClickComponent's onClick event.
onSubmitComponent's onSubmit event.

Children

The EBtn component provides a children props that enable you to customize the content.

ChildrenDescription
✔️Component's content.

COPYRIGHT