Button

This is the Button component, which is used to trigger actions or events in the user interface. It can be styled and configured to fit various design needs.

Usage

To use the Button component, import it and include it in your markup:

<button class="oui-button">Click Me</button>

Props

The Button component accepts the following props:

PropTypeDescription
typestringThe button type: button, submit, or reset.
disabledbooleanDisables the button if set to true.
autofocusbooleanAutomatically focuses the button on mount.
formstringAssociates the button with a form element by ID.
namestringName of the button, submitted with form data.
valuestringValue of the button, submitted with form data.
tabindexnumberSpecifies the tab order of the button.
aria-*stringARIA attributes for accessibility.
classstringCSS class names to apply to the button.
idstringThe unique identifier for the button element.