1.11.1 • Published 9 months ago

@seven.io/counter v1.11.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

SMS Counter by seven

Counts the SMS character usage for a textarea or text input.

Installation

For Browsers

<script src='https://unpkg.com/@seven.io/counter/dist/index.js'></script>

For NodeJS

Yarn yarn add @seven.io/counter

NPM npm install @seven.io/counter

import '@seven.io/counter'

Usage

<textarea data-seven-sms></textarea>
<input data-seven-sms/>

For advanced usage see the examples.

Options

Set the window object before loading the library.

window.SEVEN_COUNTER_OPTIONS = {
    initEvent: string = 'DOMContentLoaded', // the DOM event for init
    position: InsertPosition = 'afterend', // where to add the counter stats span relative to the input
    selector: string = '*[data-seven-sms]', // the inputs selector
    standalone: boolean = false, // stop attaching input listeners
    stats: boolean = false, // whether to output stats or not - also accepts HTMLElement or CSS selector
}

Support

Need help? Feel free to contact us.

MIT

1.11.1

9 months ago

1.11.0

9 months ago

1.9.0

9 months ago

1.8.0

9 months ago

1.7.0

9 months ago

1.10.1

9 months ago

1.10.0

9 months ago

1.6.4

1 year ago

1.6.1

2 years ago

1.6.0

2 years ago