How to use the nexusui.Toggle function in nexusui

To help you get started, we’ve selected a few nexusui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SonyCSLParis / NONOTO / src / renderer / lfo.ts View on Github external
document.body.appendChild(LFOControlsGridElem);

    let LFOToggleElem: HTMLElement = document.createElement('div');
    LFOToggleElem.id = 'LFO-toggle'
    LFOControlsGridElem.appendChild(LFOToggleElem);

    let LFORateElem: HTMLElement = document.createElement('div');
    LFORateElem.id = 'LFO-rate'
    LFOControlsGridElem.appendChild(LFORateElem);

    let LFOValueElem: HTMLElement = document.createElement('div');
    LFOValueElem.id = 'LFO-value'
    LFOControlsGridElem.appendChild(LFOValueElem);


    let lfoToggle = new Nexus.Toggle('#LFO-toggle',{
        'size': [40,20],
        'state': false
    })
    let useLFO: boolean = false;
    lfoToggle.on('change', (toggleOn) => {
        useLFO = toggleOn;
    });

    LFOToggleElem.style.setProperty('width', '100%');
    LFOToggleElem.style.setProperty('padding-top', '30px');

    let LFONameElem = document.createElement('div')
    LFONameElem.textContent = 'Improvizer'
    LFOToggleElem.appendChild(LFONameElem)
    LFONameElem.style.setProperty('padding-top', '25px');