1
0
Fork 0
freesewing/markdown/dev/reference/api/config/options/counter/en.md

30 lines
663 B
Markdown
Raw Normal View History

---
title: counter
---
2022-02-05 17:44:23 +01:00
For a given number of things, use a counter option.
Counters are for integers only. Things like number of buttons and so on.
2022-02-05 17:44:23 +01:00
## Structure
Your counter option should be a plain object with these properties:
- `count` : The default integer value
- `min` : The minimal integer value that's allowed
- `max` : The maximum integer value that's allowed
- `hide` <small>(optional)</small> : A method to [control the optional display of the option][hide]
2022-02-05 17:44:23 +01:00
[hide]: /reference/api/config/options#optionally-hide-options-by-configuring-a-hide-method
## Example
```js
options: {
butttons: {
count: 7,
min: 4,
max: 12
}
}
```