The Telerik Blazor Window component displays content in a modal or non-modal HTML window. You can alert users or present important information to them in a friendly and stylish way in both Blazor WebAssembly (WASM) and Server-side Blazor apps. The Window component consists of a content container and a title bar with predefined actions such as minimize, maximize and close. You can fully customize the Window by adapting its size, position and adding custom action buttons to its titlebar.
The Blazor Window component provides several options for defining its size. You can either use the predefined sizing options, set the width and height properties, or maximize and minimize the Window through action buttons in its title bar or through code.
The Window component allows full control over its position that can be achieved by setting the three parameters it provides: Top, Left and Centered.
Users can choose to resize the Window component by dragging the borders of the control.
The Window component offers three built-in actions: Maximize, Minimize and Close. You can define custom action buttons such as Edit or Save and provide different settings for the action button properties.
You can easily switch the Window to modal mode, so that users cannot interact with the rest of the Blazor page until it is closed.
Enabling the draggable feature, allows users to move the window exactly where it’s needed. This touch of greater flexibility will be very much appreciated by your customers as it significantly diminishes the most major drawback of windows as a UI component – their intrusiveness – a draggable window can be moved so that you can see both its content and the content underneath.
Effortlessly style the title bar of the Telerik UI for Blazor Window component with the ThemeColor parameter. It enables customization of the title bar’s color with one of the four available options—primary, dark, light and none (default).
The Window component exposes several events to let you easily handle user action and control the application logic of the Blazor app. You can use the VisibleChanged event to get notifications when the user tries to close the window, or the StateChanged even when the user tries to minimize, maximize or restore the window. In addition to that, the window action buttons expose the OnClick event that enables you to quickly to implement custom buttons and invoke application logic from the Window's title bar.
Code examples with Blazor Windows events.
Like all other Telerik UI for Blazor components, the Window component supports out of the box Keyboard Navigation and web accessibility standards implementation (WCAG, Section 508 and WAI-ARIA attributes for screen readers). This enables easy navigation through it by using just the keyboard, as well as access to the component content through assistive technologies.
The Telerik Blazor Window has several built-in themes such as Default (our own styling), Material (based on the Material Design guidelines), Bootstrap (which looks like the Bootstrap styling to integrate better) and Fluent (based on Microsoft Fluent UI). You can easily customize any of out-of-the-box themes with a few lines of CSS, or create new theme to match your colors and branding by using the Telerik SASS ThemeBuilder application.
See Telerik UI for Blazor in action and check out how much it can do out-of-the-box.
Try Telerik UI for Blazor with dedicated technical support.