Button
Overview
The button component is used to trigger an action or event, such as submitting a form, opening a Dialog, canceling an action, or performing a delete operation.
Properties
Properties | Description |
---|---|
children | The Children prop allows users to pass other components as a property, enabling users to compose together components. |
variant | The different options available for how the button looks. |
color | The color property describes the foreground color of an element's text content. |
onClick | The event triggered by user's clicks on an element |
disabled | When true, prevents the user from interacting with the element. |
fullwidth | Takes up the full width available for the element |
type | Chooses between the standard button, reset, or submit type behaviors. |
className | The className property can be used to add a CSS class to a _component _that accepts styling. In Clutch, the className property powers the visual styling panel and the class name itself is auto-generated. Additional class names can be passed to the component by twirling open the className control and passing in strings. |
style | The style property accepts a CSS JavaScript object with camelCased properties rather than a CSS string. Using the style attribute as the primary means of styling elements is generally not recommended. The style is most often used in React applications to add dynamically-computed styles at render time. Learn more about the style property here. |
ref | The ref property allows users to attach React refs to the component. Learn more about refs in React here |
Updated 6 months ago