This namespace provides access to the properties of the Switch widget.
Example
Snap.widgets.switch.getValue("widget-id");Methods
- 
    
        static getBorderColor(id) → {string}
- 
    
    Get widget border color Parameters:Name Type Description idstring Widget Id Returns:string
- 
    
        static getBorderRadius(id) → {string}
- 
    
    Get widget border radius Parameters:Name Type Description idstring Widget Id Returns:string
- 
    
        static getBorderStyle(id) → {string}
- 
    
    Get widget border style Parameters:Name Type Description idstring Widget Id Returns:string
- 
    
        static getBorderWidth(id) → {string}
- 
    
    Get widget border width Parameters:Name Type Description idstring Widget Id Returns:string
- 
    
        static getDisplayText(id) → {string}
- 
    
    Get display text value of switch Parameters:Name Type Description idstring Widget Id Returns:string
- 
    
        static getFontColor(id) → {string}
- 
    
    Get font color Parameters:Name Type Description idstring Widget Id Returns:string
- 
    
        static getFontSize(id) → {string}
- 
    
    Get font size Parameters:Name Type Description idstring Widget Id Returns:string
- 
    
        static getFontStyle(id) → {string}
- 
    
    Get font style Parameters:Name Type Description idstring Widget Id Returns:string -fontStyle, fontWeight, textDecorationLine 
- 
    
        static getHeight(id) → {number}
- 
    
    Get widget height Parameters:Name Type Description idstring Widget Id Returns:number
- 
    
        static getMargin(id, position) → {string}
- 
    
    Get widget margin Parameters:Name Type Description idstring Widget Id positionstring 'left', 'right', 'top', 'bottom', 'all' - if value not defined it will return all Returns:string
- 
    
        static getPadding(id, position) → {string}
- 
    
    Get widget padding Parameters:Name Type Description idstring Widget Id positionstring 'left', 'right', 'top', 'bottom', 'all' - if value not defined it will return all Returns:string
- 
    
        static getTextAlignment(id) → {string}
- 
    
    Get text alignment Parameters:Name Type Description idstring Widget Id Returns:string
- 
    
        static getValue(id) → {string}
- 
    
    Get value of switch Parameters:Name Type Description idstring Widget Id Returns:string
- 
    
        static getWidgetAlignment(id) → {string}
- 
    
    Get widget alignment Parameters:Name Type Description idstring Widget Id Returns:string
- 
    
        static getWidth(id) → {number}
- 
    
    Get widget width Parameters:Name Type Description idstring Widget Id Returns:number
- 
    
        static setDisplayText(id, value)
- 
    
    Set display text value of switch Parameters:Name Type Description idstring Widget Id valuestring Display Text 
- 
    
        static setValue(id, value)
- 
    
    Set value of switch Parameters:Name Type Description idstring Widget Id valuenumber 0 or 1