Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SfSwitchComponent

API reference for SfSwitchComponent

import {SfSwitchModule} from "@progress/sitefinity-component-framework";


selector: sf-switch description: Represents a switch/toggle button with ON and OFF states

Hierarchy

  • SfSwitchComponent

Implements

  • OnInit

Index

Properties

cssClassList

cssClassList: string

Css class list

disabled

disabled: boolean = false

Whether the switch is disabled

id

id: string

Sets the id attribute of the switch button

isLoading

isLoading: boolean = false

Whether loading is visible

isOn

isOn: boolean = false

Whether the switch is ON

look

look: string

Css modifier for the switch

offText

offText: string

Sets the OFF text message

onText

onText: string

Sets the ON text message

selectionChange

selectionChange: EventEmitter<boolean> = new EventEmitter<boolean>()

Selection changed emitter. Returns the current selection state (true of false)

showText

showText: boolean = true

Whether to show the OFF/ON text

Methods

generateSwitchCssClass

  • generateSwitchCssClass(): string
  • Generates the css modifiers of the wrapper

    Returns string

getOnOrOffButtonIconName

  • getOnOrOffButtonIconName(): string
  • Gets the ON/OFF icon name

    Returns string

getOnOrOffButtonLook

  • getOnOrOffButtonLook(): string
  • Generates the css modifiers of the button

    Returns string

getOnOrOffText

  • getOnOrOffText(): string
  • Gets the ON/OFF text

    Returns string

ngOnInit

  • ngOnInit(): void
  • Returns void

onSelectionChanged

  • onSelectionChanged(event: Event): void
  • Handles selection changed

    Parameters

    • event: Event

    Returns void

Generated using TypeDoc