BPT

Responsive Layout

BptResponsiveLayout

BptResponsiveLayout wraps child content and resolves the current viewport width into a cascading BptDeviceClass enum (Desktop / Tablet / Mobile). Descendants consume [CascadingParameter(Name="BptDeviceClass")] BptDeviceClass to branch their layout without threading props. Use the Override parameter to simulate a device class without resizing the browser — useful for responsive-preview panels.

Responsive Layout Parameters

Cascaded BptDeviceClass (reported via OnDeviceClassChanged)

Desktop

Resize your browser or use the Override knob above to observe the class change.

Current Configuration
📋
<BptResponsiveLayout
    OnDeviceClassChanged="HandleDeviceClassChanged">
    <!-- child content here —
         descendants can read [CascadingParameter(Name="BptDeviceClass")] BptDeviceClass -->
</BptResponsiveLayout>

@code {
private void HandleDeviceClassChanged(BptDeviceClass cls)
{
    Console.WriteLine($"Device class: {cls}");
}
}
An unhandled error has occurred. Reload 🗙

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.