Blazored.LocalStorage
1.0.0
Prefix Reserved
See the version list below for details.
dotnet add package Blazored.LocalStorage --version 1.0.0
NuGet\Install-Package Blazored.LocalStorage -Version 1.0.0
<PackageReference Include="Blazored.LocalStorage" Version="1.0.0" />
paket add Blazored.LocalStorage --version 1.0.0
#r "nuget: Blazored.LocalStorage, 1.0.0"
// Install Blazored.LocalStorage as a Cake Addin
#addin nuget:?package=Blazored.LocalStorage&version=1.0.0
// Install Blazored.LocalStorage as a Cake Tool
#tool nuget:?package=Blazored.LocalStorage&version=1.0.0
Blazored LocalStorage
A library to provide access to local storage in Blazor applications
Installing
You can install from Nuget using the following command:
Install-Package Blazored.LocalStorage
Or via the Visual Studio package manger.
Setup
First, you will need to register local storage with the service collection in your startup.cs file
public void ConfigureServices(IServiceCollection services)
{
services.AddBlazoredLocalStorage();
}
Usage
This is an example of using local storage in a .cshtml file
@inject Blazored.LocalStorage.ILocalStorageService localStorage
@functions {
protected override async Task OnInitAsync()
{
await localStorage.SetItem("name", "John Smith");
var name = await localStorage.GetItem<string>("name");
}
}
The APIs available are
- SetItem()
- GetItem()
- RemoveItem()
- Clear()
- Length()
- Key()
All APIs are now async
Note: Blazored.LocalStorage methods will handle the serialisation and de-serialisation of the data for you.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.Blazor.Browser (>= 0.7.0)
NuGet packages (119)
Showing the top 5 NuGet packages that depend on Blazored.LocalStorage:
Package | Downloads |
---|---|
Blazored.LocalStorage.TestExtensions
A testing library to provide helper extensions for Blazored.LocalStorage |
|
Blauhaus.MVVM.Blazor
Package Description |
|
RapidCMS.UI
RapidCMS is a Blazor framework which allows you to build a responsive and flexible CMS purely from code. |
|
Arc4u.Standard.OAuth2.Blazor
OAuth2 scenario for Blazor. |
|
KarcagS.Blazor.Common
Package Description |
GitHub repositories (39)
Showing the top 5 popular GitHub repositories that depend on Blazored.LocalStorage:
Repository | Stars |
---|---|
dotnet-architecture/eShopOnWeb
Sample ASP.NET Core 8.0 reference application, powered by Microsoft, demonstrating a layered application architecture with monolithic deployment model. Download the eBook PDF from docs folder.
|
|
MudBlazor/MudBlazor
Blazor Component Library based on Material design with an emphasis on ease of use. Mainly written in C# with Javascript kept to a bare minimum it empowers .NET developers to easily debug it if needed.
|
|
fullstackhero/blazor-starter-kit
Clean Architecture Template for Blazor WebAssembly Built with MudBlazor Components.
|
|
openbullet/OpenBullet2
OpenBullet reinvented
|
|
Webreaper/Damselfly
Damselfly is a server-based Photograph Management app. The goal of Damselfly is to index an extremely large collection of images, and allow easy search and retrieval of those images, using metadata such as the IPTC keyword tags, as well as the folder and file names. Damselfly includes support for object/face detection.
|
Version | Downloads | Last updated |
---|---|---|
4.5.0 | 208,944 | 2/10/2024 |
4.4.0 | 881,391 | 8/14/2023 |
4.3.0 | 1,871,605 | 11/9/2022 |
4.3.0-preview.1 | 127,278 | 3/28/2022 |
4.2.0 | 1,973,841 | 2/4/2022 |
4.1.5 | 862,334 | 8/21/2021 |
4.1.4 | 1,791 | 8/21/2021 |
4.1.2 | 232,637 | 6/13/2021 |
4.1.1 | 81,498 | 5/15/2021 |
4.0.0 | 27,040 | 5/8/2021 |
3.0.0 | 801,970 | 7/23/2020 |
2.2.0 | 7,657 | 7/23/2020 |
2.1.6 | 123,066 | 5/21/2020 |
2.1.5 | 67,142 | 3/31/2020 |
2.1.4 | 1,972 | 3/30/2020 |
2.1.3 | 4,202 | 3/27/2020 |
2.1.1 | 130,508 | 9/25/2019 |
2.1.0 | 2,749 | 9/19/2019 |
2.0.14 | 578 | 9/17/2019 |
2.0.13 | 1,059 | 9/5/2019 |
2.0.12 | 2,433 | 8/19/2019 |
2.0.11 | 870 | 8/14/2019 |
2.0.10 | 388 | 8/14/2019 |
2.0.9 | 363 | 8/14/2019 |
2.0.8 | 378 | 8/13/2019 |
2.0.7 | 994 | 7/27/2019 |
2.0.6 | 390 | 7/25/2019 |
2.0.5 | 387 | 7/25/2019 |
2.0.3 | 358 | 7/25/2019 |
2.0.2 | 1,171 | 6/13/2019 |
2.0.1 | 2,032 | 5/31/2019 |
2.0.0 | 3,152 | 4/19/2019 |
1.2.1 | 2,237 | 3/15/2019 |
1.2.0 | 1,865 | 3/13/2019 |
1.1.0 | 1,896 | 3/9/2019 |
1.0.4 | 1,751 | 3/9/2019 |
1.0.3 | 1,831 | 3/4/2019 |
1.0.2 | 1,781 | 3/2/2019 |
1.0.1 | 2,059 | 2/9/2019 |
1.0.0 | 2,030 | 1/30/2019 |