Skip to main content
The storage global is a simple key/value store for small client-side values — a user’s last selection, a cached preference, a flag.
storage.set(key, value);     // store a value
const v = storage.get(key);  // read it back
storage.remove(key);         // delete one key
storage.clear();             // wipe everything this dashboard stored

Example — remember a choice

// Restore the last selected mode on load
const last = storage.get('mode');
if (last) widget.setValue('modeSelector', last);

// Persist on change
widget.on('modeSelector', 'change', (value) => {
  storage.set('mode', value);
});
storage is for small UI state, not large datasets. For records, use db.

Next: db

Query and insert database records.