Skip to main content

Button

A reusable button component can be used in multiple parts of an application to create various UI instances. For example, a button component can display different colors in multiple parts of an application.

It typically includes customizable attributes such as text, color, size, and style, allowing developers to easily incorporate buttons into their user interface designs without duplicating code. This component promotes code reusability, improves maintainability, and ensures a cohesive user experience.

Props

PropsDatatypeValues/Example
typestring"primary" | "dark" | "danger" | "transparent" | "other" | "icon"
disableboolean"true" | "false"
loaderboolean"true" | "false"
loaderSizenumber16 | 16
titlestring"Cancel"
onClickfunctionfunction from parent component
textStylePropObject{"font-size: var(--base-text)"}
textClassPropObject{"font-size: var(--base-text)"}
buttonClassPropObject{"font-size: var(--base-text)"}
buttonStylePropObject{"font-size: var(--base-text)"}
allowChildboolean"true" | "false"

Variants