Button
Button
Component demo
Interactive example
<ic-buttonid='my-button'variant="primary">Add to order</ic-button><ic-buttonvariant="secondary">View coffees</ic-button><ic-buttonvariant="tertiary">Find out more</ic-button><ic-buttonvariant="destructive">Cancel order</ic-button>
<IcButtonvariant="primary"onClick={(ev)=>console.log(ev)}> Add to order</IcButton><IcButtonvariant="secondary">View coffees</IcButton><IcButtonvariant="tertiary">Find out more</IcButton><IcButtonvariant="destructive">Cancel order</IcButton>
Button details
Props
All components also accept native properties supported by the DOM, such asclassName
and
style
.
|
|
|
---|---|---|
|
If |
|
|
The appearance of the button, e.g. dark, light, or the default. |
|
|
If |
|
|
If |
|
|
If |
|
|
If |
|
|
If |
|
|
The name of the control for the file input, which is submitted with the form data. |
|
|
If |
|
|
The <form> element to associate the button with. |
|
|
The URL that processes the information submitted by the button. It overrides the action attribute of the button's form owner. Does nothing if there is no form owner. |
|
|
The way the submitted form data is encoded. |
|
|
The HTTP method used to submit the form. |
|
|
If |
|
|
|