Button
A user clicking on the "Button" component triggers an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.
It also can be render as an anchor, to navigate between pages, when you use the href
prop.
Install
The button component is contained in the @cypress-design/react-button
package. You'll also want to install @cypress-design/constants-button
to get proper types for TypeScript.
npm install @cypress-design/vue-button @cypress-design/constants-button
or with yarn
yarn add @cypress-design/vue-button @cypress-design/constants-button
Usage
import Button from '@cypress-design/vue-button'
Square buttons
Possible variants
Variants and their available sizes plus styles when disabled
is set to true
(represented as 🚫).
{{ variant }}{{ size }}🚫
Props
type
type "button" | "submit" | "reset"
variant
type
disabled
type boolean
size
type "20" | "24" | "32" | "40" | "48"
square
type boolean
href
type string
Events
click
<Button
@click="($event: MouseEvent) => {
// your code here
}"
/>
Properties
$event
MouseEvent
Slots
default
The content of the button