Button

Buttons enable users to take actions or navigate to different pages. They come in various styles to suit different needs and are particularly effective for drawing attention to the actions users need to take in order to progress in a workflow.

TypeResource
DesignFigma
WebWeb Storybook
CodeGitlab

Usage

import { Button } from 'bio-bind-ui';
<Button
  endIcon=''
  icon=''
  id='button'
  label='BUTTON'
  labelLoading='Loading...'
  loadingPosition='left'
  mode='light'
  name='button'
  onClick={() => {}}
  radius='xs'
  size='md'
  startIcon=''
  type='solid'
  variant='primary'
/>

Examples

Button Variant

Use the variant prop to change color style of the Button. You can set the value to primary, secondary, or danger

Button Type

Use the type prop to change the visual style of the Button. You can set the value to solid, outline, ghost, or link.

Button Size

Use the size prop to change the size of the Button. You can set the value to xs, sm, md, or lg.

Loading (optional)

Enable the isLoading prop to set button become loading state. You can set loadingPosition to left or right


Props

PropsRequiredDefaultTypedescription
endIconfalse-ReactNodeIf added, the button will show an icon after the button’s label.
iconfalse-ReactNodeProvide for Icon Button (Icon Only)
idfalse-stringA unique identifier for the button.
labeltrue-stringThe label text on the button.
isLoadingfalsefalsetrue falseIf true, the button will be set to be loading state
labelLoadingfalse"Loading"stringThe button label when it is loading.
loadingPositionfalseleftleft rightIt determines the position of the spinner when isLoading is true (left or right)
modefalselightlight darkThe theme mode of the button (light or dark).
namefalsebuttonstringName for the button
onClickfalse-functionCallback function to run when the button is clicked.
radiustruesmnone xs sm md lg fullCorner radius of the button
sizetruemdxs sm md lgThe size of the Button
startIconfalse-ReactNodeIf added, the button will show an icon before the button’s label
stylefalse-CSSPropertiesCustom styles for the button component.
variantfalseprimaryprimary secondary dangerThe visual color variant of the button.
typefalsesolidsolid subtle outline ghost, link, iconThe visual style variant of the button.
disabledfalsefalsetrue falseIf true, button will be set to be disabled state
BIND © Biofarma Innovate Next-level Design .