Blazorise Offcanvas Provider API

Review the provider component and service methods used to create and manage offcanvas instances.

For setup instructions and examples, see the Offcanvas Provider documentation.

API

Parameters

ParameterDefaultType
Animatedtruebool

Determines whether the component has any animations. Global option.
AnimationDuration150int

Specifies the animation duration. Global option.
PlacementEndPlacement

Specifies the position of the offcanvas.
Possible values:TopBottomStartEnd
ShowBackdroptruebool

Specifies the backdrop needs to be rendered for this Offcanvas. Global option.
ShowCloseButtontruebool

Shows a close button in the offcanvas header when using the provider structure. Global option.
SizeOffcanvasSize.DefaultOffcanvasSize

Changes the size of the offcanvas.
Possible values:DefaultSmallLargeExtraLargeFullscreen
Statefulfalsebool

Keeps the OffcanvasInstance in memory after it has been closed. Defaults to false.
UseOffcanvasStructuretruebool

Uses the offcanvas standard structure, by setting this to true you are only in charge of providing the custom content. Defaults to true. Global option.

Events

EventType
CloseButtonClickedEventCallback

Callback executed when the close button is clicked. Global option.
ClosedEventCallback

Occurs after the offcanvas has closed. Global option.
ClosingFunc<OffcanvasClosingEventArgs, Task>

Occurs before the offcanvas is closed. Global option.
OpenedEventCallback

Occurs after the offcanvas has opened. Global option.
OpeningFunc<OffcanvasOpeningEventArgs, Task>

Occurs before the offcanvas is opened. Global option.

IOffcanvasService

Properties

PropertyType
OffcanvasProviderOffcanvasProvider

Gets the provider that manages offcanvas instances.

Methods

MethodReturnParameters
SetOffcanvasProvidervoidOffcanvasProvider offcanvasProvider

Sets the provider used to manage offcanvas instances.
Show<TComponent>Task<OffcanvasInstance>title, parameters, options (depending on overload)

Shows a component in an offcanvas panel. Overloads support a title, component parameters, and instance options.
ShowTask<OffcanvasInstance>component type or RenderFragment, with optional title and options

Shows dynamically selected component content or a render fragment.
ShowTaskOffcanvasInstance offcanvasInstance

Reopens an existing offcanvas instance.
HideTaskOffcanvasInstance offcanvasInstance (optional)

Hides the latest offcanvas panel or a specific instance.
GetInstancesIEnumerable<OffcanvasInstance>—

Returns all offcanvas instances managed by the provider.
RemoveTaskOffcanvasInstance offcanvasInstance

Removes an offcanvas instance from the provider.
ResetTask—

Clears the offcanvas provider state and its tracked instances.
On this page