> For the complete documentation index, see [llms.txt](https://mobius-studios.gitbook.io/selectable/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mobius-studios.gitbook.io/selectable/api/options/savestate.md).

# saveState

***

Type: `{Number|Boolean}`

Default: `false`

***

Enables saving selection states

***

The property accepts either a `Number` to set the maximum number of states to save or `false` to disable state-saving.\
\
When set to a `Number`, older saves will be pruned when reaching  the limit.

***

```javascript
new Selectable({
    saveState: 10 // sets the maximum number of saved states to 10
});
```

***

```javascript
new Selectable({
    saveState: false // disables state-saving completely
});
```
