You are viewing Pre-Alpha documentation.
Vuetify0 Logo

useStorage API

API reference for the useStorage composable.

Options

adapter

StorageAdapter

The storage adapter to use. Defaults to localStorage in browser, MemoryAdapter otherwise

prefix

string

The prefix to use for all storage keys. Defaults to 'v0:'

serializer

{ read: (value: string) => unknown; write: (value: unknown) => string; }

Custom serializer for reading and writing values. Defaults to JSON.parse/stringify

Methods

has

(key: string) => boolean

Check if a key exists in storage

get

<T>(key: string, defaultValue?: T) => Ref<T>

Get a reactive ref for a storage key

set

<T>(key: string, value: T) => void

Set a value for a storage key

remove

(key: string) => void

Remove a key from storage

clear

() => void

Clear all keys from storage


© 2016-2025 Vuetify, LLC
Ctrl+/