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

Toggle

Component used to quickly switch between two possible states: true and false.

Usage

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

 <r-toggle
    v-model="model"
    label="My label"
    name="toggle-example"
    @update:model-value="change"
/>

Example

toggle.vue

API

Props

NameTypeDefaultDescription
labelNullable, stringnull

Displays a label for the toggle

namestring() => nanoid()

Adds a unique id to the toggle

modelValuebooleanfalse

Parent model for the component

disabledbooleanfalse

Disables the toggle

Events

NameDescription
update:modelValue
Edit this page
Last Updated: 7/17/24, 7:07 PM
Contributors: Dasha Baklanova, John Hannagan, Weetbix, Cesar Level
Prev
Toast