Skip to content

WML Toggle

starlightViewModes.switchTo

The Angular WML Toggle library offers a customizable toggle switch component for Angular applications. This library provides an easy-to-integrate toggle switch that enhances user interfaces by allowing binary choices such as settings or preferences. The core component, WMLToggleZeroComponent, is designed to be flexible and modular, enabling developers to tailor its appearance and behavior to fit their application’s requirements. Features include:

  • Customizable Appearance: Modify the toggle’s background colors, text, and styles.
  • Event Handling: Define actions on toggle state changes.
  • Integration with Forms: Supports reactive forms and updates based on form control status.
  • Responsive Design: Adapts to different screen sizes for a consistent user experience.

To install the WML Toggle library, use the following command:

Terminal window
npm install -s --verbose @windmillcode/angular-wml-toggle

Here are some possible examples of how to use the WMLToggleZeroComponent in your Angular application:

  • you can sure to use onToggle to “listen for changes” how neat
PropertyTypeDescription
idstringIdentifier for the toggle instance.
containerWMLUIPropertyConfiguration for the toggle container.
thumbWMLUIPropertyConfiguration for the toggle thumb.
toggleTextWMLUIPropertyConfiguration for the toggle text.
textToggleLeftMarginnumberLeft margin for the toggle text.
toggleBackgroundOnColorstringBackground color when the toggle is “On”.
toggleBackgroundOffColorstringBackground color when the toggle is “Off”.
triggerToggleFunctionFunction to programmatically trigger the toggle.
wmlFieldWMLFieldZeroPropsIntegration with WML Field component.
onToggle(self: WMLToggleZeroProps) => voidCallback function triggered on toggle state change.
  • component created and ready for production use
  • added triggerToggle ,
  • updated package to reflect the version ^17.0.4 of @angular/core package,
  • updated package to reflect the version ^17.0.5 of @angular/core package,
  • updated package to reflect the version ^17.0.6 of @angular/core package,
  • updated package to reflect the version ^17.0.7 of @angular/core package
  • added support to be integrated with wml-form so that values can be passed to a form control
  • fixed code to remove deprecated scss warnings
  • added listened so when form is edited via patchValue the changes apply
  • added in disabled featured and corrected error when listenForFormValue changes was triggered till infinity ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^17.0.8 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^17.1.0 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^17.1.2 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^17.1.3 of @angular/core package,
  • updated package to reflect the version ^17.2.1 of @angular/core package,
  • updated package to reflect the version ^17.2.2 of @angular/core package,
  • updated package to reflect the version ^17.2.3 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^17.2.4 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^17.3.0 of @angular/core package ,
  • updated package to reflect the version ^17.3.1 of @angular/core package,
  • updated package to reflect the version ^17.3.2 of @angular/core package,
  • updated package to reflect the version ^17.3.3 of @angular/core package,
  • updated package to reflect the version ^17.3.4 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^17.3.5 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^17.3.6 of @angular/core package,
  • updated package to reflect the version ^17.3.7 of @angular/core package,
  • updated package to reflect the version ^17.3.8 of @angular/core package,
  • updated package to reflect the version ^17.3.9 of @angular/core package,
  • updated package to reflect the version ^18.0.0 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^18.0.1 of @angular/core package,
  • updated package to reflect the version ^18.0.2 of @angular/core package

[FIX]

In wml-toggle-zero.component.html, modified the click event to call toggle with parameters null and true.

Added distinctUntilChanged to listenForformControlChanges in wml-toggle-zero.component.ts to prevent redundant updates. In wml-toggle-zero.component.ts, adjusted toggle method to conditionally patch form control based on the new updateFormControl parameter. ,

  • updated package to reflect the version ^18.0.3 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^18.0.5 of @angular/core package,
  • updated package to reflect the version ^18.0.6 of @angular/core package,
  • updated package to reflect the version ^18.1.0 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to reflect the version ^18.1.1 of @angular/core package,
  • updated package to reflect the version ^18.1.2 of @angular/core package,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base ,
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to reflect the version 18.2.1 of @angular/core package
  • updated package to reflect the version 18.2.2 of @angular/core package
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to reflect the version 18.2.3 of @angular/core package
  • updated package to reflect the version 18.2.3 of @angular/core package
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/angular-wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to reflect the version 18.2.4 of @angular/core package
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to reflect the version 18.2.5 of @angular/core package
  • updated package to reflect the version 18.2.6 of @angular/core package
  • updated package to reflect the version 18.2.7 of @angular/core package
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to reflect the version 18.2.8 of @angular/core package
  • updated package to reflect the version 18.2.8 of @angular/core package
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to reflect the version 19.0.2 of @angular/core package
  • updated package to reflect the version 19.0.3 of @angular/core package
  • updated package to reflect the version 19.0.4 of @angular/core package
  • updated package to reflect the version 19.0.5 of @angular/core package
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to reflect the version 19.0.6 of @angular/core package
  • updated package to reflect the version 19.0.7 of @angular/core package
  • updated package to reflect the version 19.1.0 of @angular/core package
  • updated package to reflect the version 19.1.1 of @angular/core package
  • updated package to reflect the version 19.1.2 of @angular/core package
  • updated package to reflect the version 19.1.3 of @angular/core package
  • update package to support the react native ecosystem
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to reflect the version 19.1.4 of @angular/core package
  • updated package to reflect the version 19.1.5 of @angular/core package
  • updated package to reflect the version 19.1.6 of @angular/core package
  • updated package to reflect the version 19.1.7 of @angular/core package
  • updated package to reflect the version 19.1.8 of @angular/core package
  • updated package to reflect the version 19.2.0 of @angular/core package
  • updated package to reflect the version 19.2.1 of @angular/core package
  • updated package to reflect the version 19.2.2 of @angular/core package
  • updated package to reflect the version 19.2.3 of @angular/core package
  • updated package to reflect the version 19.2.4 of @angular/core package
  • updated package to reflect the version 19.2.5 of @angular/core package
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to conform with @windmillcode/wml-components-base
  • updated package to reflect the version 19.2.8 of @angular/core package
  • updated package to reflect the version 19.2.9 of @angular/core package
  • updated package to reflect the version 19.2.10 of @angular/core package