| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
| description | Samples to accompany the official Microsoft Blazor documentation. | |||
|---|---|---|---|---|
| page_type | sample | |||
| languages |
|
|||
| name | Blazor sample applications | |||
| products |
|
|||
| urlFragment | / |
Samples in this repository accompany the official Microsoft Blazor documentation.
To obtain a local copy of the sample apps in this repository, use either of the following approaches:
To obtain a single sample app and only its last commit, use git sparse-checkout.
In the following example, the git sparse-checkout set command specifies the path to the sample folder:
In a command shell, navigate to the folder where you would like to clone the sample. Execute the following commands in the command shell passing the version/sample folder path to the git sparse-checkout set command:
git clone --depth 1 --filter=blob:none https://github.com/dotnet/blazor-samples.git --sparse
cd blazor-samples
git sparse-checkout init --cone
git sparse-checkout set {VERSION FOLDER}/{SAMPLE FOLDER}
The following PowerShell example obtains the 10.0 Blazor Web App sample and places it in the user's documents folder using PowerShell's ~/documents path for the change directory (cd) command:
cd "~/documents"
git clone --depth 1 --filter=blob:none https://github.com/dotnet/blazor-samples.git --sparse
cd blazor-samples
git sparse-checkout init --cone
git sparse-checkout set 10.0/BlazorSample_BlazorWebAppGeneral Blazor samples referenced by the full Blazor documentation set (BlazorSample_BlazorWebApp/BlazorSample_BlazorWebAssembly)
.NET MAUI Blazor Hybrid app with a Blazor Web App and a shared UI RCL (MauiBlazorWeb)
Build a .NET MAUI Blazor Hybrid app with a Blazor Web App
.NET MAUI Blazor Hybrid and Web App with ASP.NET Core Identity (MauiBlazorWebIdentity)
.NET MAUI Blazor Hybrid and Web App with ASP.NET Core Identity
Blazor with SignalR (BlazorSignalRApp)
Use ASP.NET Core SignalR with Blazor
Blazor Web App movie database app tutorial (BlazorWebAppMovies)
Build a Blazor movie database app
Blazor Web App with Microsoft Entra ID (BlazorWebAppEntraBffYarpAspire/BlazorWebAppEntraBff)
Secure an ASP.NET Core Blazor Web App with Microsoft Entra ID
Blazor Web App with OIDC and Aspire (BlazorWebAppOidcBffAutoYarpAspire/BlazorWebAppOidcBffAuto/BlazorWebAppOidcBffServer)
Secure an ASP.NET Core Blazor Web App with OpenID Connect (OIDC)
Blazor Web App with Windows Authentication
Secure an ASP.NET Core Blazor Web App with Windows Authentication
Call a web API (BlazorWebAppCallWebApi/BlazorWebAssemblyCallWebApi/BlazorWebAppCallWebApi_Weather)
Call a web API from ASP.NET Core Blazor
Blazor WebAssembly scopes-enabled logging (BlazorWebAssemblyScopesLogger)
ASP.NET Core Blazor logging: Client-side log scopes
Blazor WebAssembly with ASP.NET Core Identity (BlazorWebAssemblyStandaloneWithIdentity)
Blazor WebAssembly with ASP.NET Core Identity
Blazor WebAssembly with app roles, built-in Azure Administrator roles, and Azure security groups (BlazorWebAssemblyEntraGroupsAndRoles)
Microsoft Entra (ME-ID) groups, Administrator Roles, and App Roles
WebAssembly Browser App import-export interop (WASMBroswerAppImportExportInterop)
JavaScript [JSImport]/[JSExport] interop with a WebAssembly Browser App project
Blazor WebAssembly Xref Generator (BlazorWebAssemblyXrefGenerator)
Host and deploy ASP.NET Core Blazor WebAssembly with GitHub Pages
.NET on Web Workers (DotNetOnWebWorkers)
.NET on Web Workers
Blazor WebAssembly + React (BlazorWebAssemblyReact)
Host and deploy: JavaScript bundler support
.NET WebAssembly + React (DotNetWebAssemblyReact)
Host and deploy: JavaScript bundler support
WARNING: Always follow an article's security guidance when implementing sample code.
Prior to the release of .NET 8, snippet sample apps for Blazor Server and Blazor WebAssembly provide the code examples that appear in Blazor articles. Many of the components in the snippet sample apps compile and run if copied to a local test app. However, the entire snippet sample apps aren't meant to be runnable demonstration sample apps, and not all of the components are completely functional. The purpose of the snippet sample apps prior to .NET 8's release is merely to supply code examples to documentation.
For the release of .NET 8 (and later releases), the sample apps for Blazor Web App and Blazor WebAssembly both supply snippets to articles and are fully working demonstration sample apps.
Blazor snippet sample apps
For more information, see the Support requests section in the Blazor Fundamentals overview article.
| Back | FazBrowse Home | New Git URL |