11.13.0

Button

Button Variants


The primary button is used for the most important button on the page. Secondary buttons can be used for actions that are less important. Button links can be helpful for buttons that do not need a lot of attention drawn to them. Disabled buttons are used when you don't want the user to click the button.

Button Full Width


This button is used many times for mobile or other things like cards and sidebars.

Button Loading


Used when a button will take a little while to load. The spinner lets the user know that the button has worked and it is in the process of loading.

Button Block Content


Used when the user wants to display custom content within a button instead of passing in text or props to the kit itself. In this example the button is using the Pill kit and a <span> element inside the button.

Button Icon Options


Icons can also be added to a button if needed. By default, the icon will be displayed on the left of the text. To display the icon on the right, use the optional prop of iconRight in react or icon_right in rails.

Button Accessibility Options

Button with ARIA
Button Additional Options


Button Size


By default button has the md size style, even if you don't explicitly pass a size prop.

Button Form Attribute



Things to Avoid

Never use more than one primary button on a page at any given time.

UI Samples using Button Kit

Get the full picture. See how this kit is used in our samples.

Available Props

  • classname
  • dark
  • margin
  • margin_bottom
  • margin_left
  • margin_right
  • margin_top
  • margin_x
  • margin_y
  • max_width
  • padding
  • padding_bottom
  • padding_left
  • padding_right
  • padding_top
  • padding_x
  • padding_y
  • z_index
  • number_spacing
  • shadow
  • line_height
  • display
  • cursor
  • flex_direction
  • flex_wrap
  • justify_content
  • justify_self
  • align_items
  • align_content
  • align_self
  • flex
  • flex_grow
  • flex_shrink
  • order
  • id
  • data
  • aria
  • children
  • disabled
  • full_width
  • icon
  • icon_right
  • link
  • loading
  • new_window
  • variant
  • text
  • type
  • value
  • size
  • form