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