Skip to content

Switch

Everybody 1-2-Switch!

Example

Show Code
vue
<script lang="ts" setup>
import { RSwitch } from 'roughness'
</script>

<template>
  <RSwitch>Airplane Mode</RSwitch>
</template>

Usage

Props

NameTypeDefault ValueDescription
graphicsOptions
modelValue
...

See Space Props.

Unlike Space, the default value of Switch's tag is label.

Events

NameTypeDescription
update:modelValue

Styles

NameTypeDefault ValueDescription
--r-switch-border-color
--r-switch-border-width
--r-switch-control-size
--r-switch-track-color
--r-switch-handle-color
...

See Space Styles.

Released under the ISC License.