--- 
title: Switcher
description: Toggle switch control
category: components
alias: slide toggle, checkbox, switch, toggle
a1Full: true
group: Forms & Inputs

module: NxSwitcherModule
components:
  - name: NxSwitcherComponent
    selector: nx-switcher
    inputs:
      - name: ariaLabel
        default: input<string | null>(null)
        type: "InputSignal<string | null>"
      - name: ariaLabelledBy
        default: input<string | null>(null)
        type: "InputSignal<string | null>"
      - name: hint
        desc: "Sets a hint which is displayed underneath the label."
        default: input('')
        type: "InputSignal<string>"
      - name: inverseInput
        desc: "Whether the inverse set of styles, for use on a dark background, is applied."
        default: input(false, {
      alias: 'inverse',
      transform: coerceBooleanProperty,
    })
        type: "InputSignalWithTransform<boolean, any>"
      - name: readonly
        desc: "Sets switcher to readonly."
        default: false
        type: "boolean"
      - name: ariaDescribedBy
        type: "string | null"
      - name: labelPosition
        desc: "Specifies the placement of the label"
        type: "'left' | 'right'"
      - name: name
        desc: "Sets the label text of the switcher"
        type: "string"
      - name: checked
        desc: "Whether the switcher is checked (on) or unchecked (off)"
        type: "boolean"
      - name: big
        desc: "Whether the big switcher is used"
        type: "BooleanInput"
      - name: labelSize
        desc: "Sets the size of the label"
        type: "'small' | 'large'"
      - name: negative
        desc: "Whether the style for a dark background is used."
        type: "BooleanInput"
      - name: disabled
        desc: "Whether the switcher is in the disabled state"
        type: "BooleanInput"
      - name: required
        type: "boolean"
    outputs:
      - name: checkedChange
        desc: "An event is dispatched each time the switcher value is changed"
        type: "EventEmitter<boolean>"
    methods:
      - name: validate
        params:
          - name: control
            type: AbstractControl<any, any, any>
        returnType: ValidationErrors | null
      - name: toggle
        params:
          - name: event
            type: Event
        desc: "Allows to toggle between the states"
        returnType: void
      - name: setDisabledState
        params:
          - name: isDisabled
            type: boolean
        returnType: void
      - name: touch
        params: 
        returnType: void
      - name: updateErrorState
        params: 
        returnType: void
      - name: labelContentChanged
        params: 
        desc: "Callback for when the content of the label has changed."
        returnType: void
      - name: setReadonly
        params:
          - name: value
            type: boolean
        returnType: void

---
# Overview
The switcher component represents a boolean value, just like the native input of a checkbox.
