Edit

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.

Edit

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.

bash
npm install @cypress-design/vue-button @cypress-design/constants-button

or with yarn

bash
yarn add @cypress-design/vue-button @cypress-design/constants-button

Usage

ts
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 🚫).





Props

type

type "button" | "submit" | "reset"

variant

type

"link" | "white" | "disabled" | "outline-indigo" | "outline-purple" | "outline-red" | "outline-gray-dark" | "outline-light" | "outline-gray-light" | "outline-orange-dark" | "outline-orange-light" | ...

disabled

type boolean

size

type "20" | "24" | "32" | "40" | "48"

square

type boolean

href

type string


Events

click

vue
<Button
  @click="($event: MouseEvent) => { 
        // your code here
      }"
/>

Properties

$event
type: MouseEvent

Slots

default

The content of the button