@mangoweb/toggler
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

Toggler

The manGoweb Toggler component. Toggles class on target element.

Installation

$ npm install @mangoweb/toggler @mangoweb/scripts-base

This is a @mangoweb/scripts-base component.

Usage

In your template:

<script>
	window.initComponents = (window.initComponents || []).push({
		name: 'Toggler',
		place: 'body'
	})
</script>

Use by adding following attributes to HTML element with 'toggler' class:

  • data-target - target selector
  • data-class-name - class to toggle
  • data-remove-others - remove toggle class from elements matching this selector
  • data-prevent-default - prevent default event behaviour

Readme

Keywords

none

Package Sidebar

Install

npm i @mangoweb/toggler

Weekly Downloads

0

Version

0.0.6

License

MIT

Unpacked Size

28.9 kB

Total Files

9

Last publish

Collaborators

  • jirkavebr
  • luchalupa
  • mango-cli
  • matejsimek
  • onset
  • viliamkopecky