https://github.com/soenneker/soenneker.blazor.mediaquery
A Blazor interop library for media queries for viewport size logic
https://github.com/soenneker/soenneker.blazor.mediaquery
blazor csharp dotnet interop js media mediaquery mediaqueryinterop query viewport
Last synced: 4 months ago
JSON representation
A Blazor interop library for media queries for viewport size logic
- Host: GitHub
- URL: https://github.com/soenneker/soenneker.blazor.mediaquery
- Owner: soenneker
- License: mit
- Created: 2024-09-21T20:57:36.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2026-03-11T03:37:49.000Z (4 months ago)
- Last Synced: 2026-03-11T05:13:45.457Z (4 months ago)
- Topics: blazor, csharp, dotnet, interop, js, media, mediaquery, mediaqueryinterop, query, viewport
- Language: C#
- Homepage: https://soenneker.com
- Size: 1.93 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
[](https://www.nuget.org/packages/soenneker.blazor.mediaquery/)
[](https://github.com/soenneker/soenneker.blazor.mediaquery/actions/workflows/publish-package.yml)
[](https://www.nuget.org/packages/soenneker.blazor.mediaquery/)
#  Soenneker.Blazor.MediaQuery
### A Blazor interop library for media queries and viewport size logic
## Installation
```
dotnet add package Soenneker.Blazor.MediaQuery
```
### Register with `IServiceCollection`:
```csharp
public void ConfigureServices(IServiceCollection services)
{
services.AddMediaQueryInteropAsScoped();
}
```
## Usage
```razor
// Supports standard CSS media queries
This is visible at widths greater than 768px
```