Primals
Button

Button Component

The Button component is a styled button element that can be used to trigger actions in your application.

Props

The Button component accepts the following props:

PropDescriptionType
childrenThe content of the Button component.Node
borderColorA string that sets the border color of the Button.String
borderA string that sets the border of the Button.String
shadowA string that sets the shadow of the Button.String
transitionFunctionA string that sets the transition function of the Button.String
transitionTimingA string that sets the transition timing of the Button.String
transitionPropertiesA string that sets the transition properties of the Button.String
radiusA string that sets the border radius of the Button.String
bgA string that sets the background color of the Button.String
backgroundColorA string that sets the background color of the Button.String
wA string that sets the width of the Button.String
hA string that sets the height of the Button.String
widthA string that sets the width of the Button.String
heightA string that sets the height of the Button.String
pA string that sets the padding of the Button.String
ptA string that sets the top padding of the Button.String
prA string that sets the right padding of the Button.String
pbA string that sets the bottom padding of the Button.String
plA string that sets the left padding of the Button.String
pxA string that sets the horizontal padding of the Button.String
pyA string that sets the vertical padding of the Button.String
paddingA string that sets the padding of the Button.String
mA string that sets the margin of the Button.String
mtA string that sets the top margin of the Button.String
mbA string that sets the bottom margin of the Button.String
mrA string that sets the right margin of the Button.String
mlA string that sets the left margin of the Button.String
mxA string that sets the horizontal margin of the Button.String
myA string that sets the vertical margin of the Button.String
marginA string that sets the margin of the Button.String
sizeA string that sets the size of the Button. It can be 'sm' or 'lg'.String
variantA string that sets the variant of the Button. It can be 'danger', 'info', 'success', or 'warning'.String

Usage

<Button
  borderColor="red-500"
  size="sm"
  variant="success"
>
  Click me!
</Button>