Blazorise Offcanvas API
Explore the Blazorise Offcanvas API reference for parameters, events, methods, and related types.
For examples and usage guidance, see the Offcanvas documentation.
API
Parameters
Offcanvas
| Parameter | Default | Type |
|---|---|---|
Animated | true | bool |
Specifies whether the Offcanvas should have an animated transition. | ||
AnimationDuration | 300 | int |
The duration of the animation in milliseconds. | ||
ChildContent | null | RenderFragment |
The content to be rendered inside the Offcanvas. | ||
Placement | Start | Placement |
Specifies the position of the Offcanvas. Possible values: TopBottomStartEnd | ||
ShowBackdrop | true | bool |
Specifies whether to render the backdrop for this Offcanvas. | ||
Size | Default | OffcanvasSize |
Changes the size of the offcanvas. Possible values: DefaultSmallLargeExtraLargeFullscreen | ||
Visible | false | bool |
Specifies the visibility state of the Offcanvas. | ||
OffcanvasHeader
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this OffcanvasHeader . | ||
OffcanvasBody
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this OffcanvasBody . | ||
OffcanvasFooter
| Parameter | Default | Type |
|---|---|---|
ChildContent | null | RenderFragment |
Specifies the content to be rendered inside this OffcanvasFooter. | ||
Events
Offcanvas
| Event | Type |
|---|---|
Closed | EventCallback |
Event callback for when the Offcanvas has been closed. | |
Closing | Func<OffcanvasClosingEventArgs, Task> |
Callback for handling the closing of the Offcanvas. | |
Opened | EventCallback |
Event callback for when the Offcanvas has been opened. | |
Opening | Func<OffcanvasOpeningEventArgs, Task> |
Callback for handling the opening of the Offcanvas. | |
VisibleChanged | EventCallback<bool> |
Event callback for when the visibility state of the Offcanvas changes. | |
Methods
Offcanvas
| Method | Return | Parameters |
|---|---|---|
Close | Task | CloseReason closeReason |
Triggers the closable component to be closed.
| ||
Hide | Task | — |
Fires the offcanvas dialog closure process.
| ||
IsSafeToClose | Task<bool> | string elementId, CloseReason closeReason, bool isChildClicked |
Finds if the closable component is ready to be closed.
| ||
Show | Task | — |
Starts the offcanvas opening process.
| ||