Skip to content

NbSwitch is a toggle control that represents an on/off binary state. It supports labels, sizes, variants, and a verbose mode that shows the current state as text.

vue
<template>
  <NbSwitch v-model="enabled" name="notifications" label="Notifications" />
</template>

Sizes ​

Verbose mode ​

When verbose is enabled, the switch shows the current state as a text label (On / Off) alongside the toggle.

Disabled ​

Props ​

PropTypeDefaultDescription
modelValuebooleanfalseCurrent state (v-model)
namestringrequiredNative name attribute
labelstring-Label text shown beside the toggle
size'sm' | 'md' | 'lg''md'Toggle size
variant'primary' | 'secondary''primary'Color variant for the active state
verbosebooleanfalseShow On / Off state text
disabledbooleanfalseDisable the toggle

Events ​

EventPayloadDescription
update:modelValuebooleanEmitted when the toggle is clicked