Revel
GitHub
GitHub
  • Overview

    • Getting started
    • FAQ
    • Release notes
  • Foundations

    • Meet the standard
    • Accessibility
    • Internationalization
    • Information hierarchy
    • Speed
  • Design

    • Visual principles
    • Colors
    • Space
    • Icons
    • Typography
  • Design tokens
  • Style helpers
  • Content

    • Express your ideas
    • Actionable language
    • Inclusive and accessible language
    • Alternative text
    • Grammar and mechanics
      • Basics
      • Capitalization
      • Dates and units of measurement
      • Punctuation
  • Components

    • Alert
    • Avatar
    • Badge
    • Button
    • Button group
    • Checkbox
    • Date Input
      • dates
      • datetimes
      • ranges
    • Field group
    • File upload
    • Flex
    • Grid
    • Icon
    • Image
    • Input
    • Loader
    • Modal
    • Month picker
    • Pagination
    • Popper
    • Radio
    • Repeater
    • Select
    • Tabs
    • Tile
    • Toast
    • Toggle
  • Directives

    • Click outside
    • Tooltip

Button

Regular button, can be used as action trigger in any part of your application and support all native DOM events for buttons.

Usage

import { RButton } from '@rebilly/revel';

<r-button
  :size="size"
  :type="type"
  :fluid="fluid"
  :disabled="disabled"
  :loading="loading"
  :capitalizeFirstLetter="capitalizeFirstLetter"
  :href="href"
  @click="click"
  @focus="focus"
  @blur="blur"
>
  {{text}}
</r-button>
button-types.vue
button-link.vue
button-icons.vue
button-sizes.vue
button-states.vue

API

Props

NameTypeDefaultDescription
sizeunion, "small", "regular", "large"'regular'

Specify button size

linkbooleanfalse

Specify button as anchor link element

hrefstringundefined

Anchor link element destination URL

typeunion, "default", "primary", "danger", "positive", "plain", "unstyled", "link"'default'

Specify button type according to your theme colors

disabledbooleanfalse

Disabled state just like for regular html button

activebooleanfalse

Active state just like for regular button

fluidbooleanfalse

Make button full width

loadingbooleanfalse

Append loading spinner to button

capitalizeFirstLetterbooleantrue

Capitalize the first letter

iconLeftIconNamesundefined

Append icon to the left side of the button

iconRightIconNamesundefined

Append icon to the right side of the button

iconIconNamesundefined

Displays only icon

Slots

NameDescription
default

Text content inside anchor.

Edit this page
Last Updated: 7/17/24, 9:18 PM
Contributors: Dasha Baklanova, John Hannagan, Cesar Level, Weetbix, mehicalen
Prev
Badge
Next
Button group