Skip to main content

BwView | bw-view

Overview

Views are a generic layout for displaying an entire page worth of content. They are primarily meant to be used inside overlays, but they could be used to format any standalone information.

For examples on how to use views, read the wizard tutorial.

Properties

PropertyAttributeDescriptionTypeDefault
closableclosableRenders a close button at the end of the header that will auto close a parent overlay if it existsbooleantrue
crumbs--This is set by a parent bw-view-manager if it exists. Do not set directlystring[][]
destroy--Execute a callback after the view has dismissed. Only applicable when used inside a view manager() => void | Promise<void>undefined
formformSet this to the id of a bw-form if you need the close button to trigger a discard changes prompt.stringundefined
init--Execute a callback before the view starts presenting. Only applicable when used inside a view manager() => void | Promise<void>undefined
labellabelThe header of the viewstringundefined
noHeaderno-headerWhether or not the header slot should be renderedbooleanfalse
showWizardshow-wizardWhether or not this view should show the wizard. Only applies if being used in a bw-view-manager.booleanfalse
steps--This is set by a parent bw-view-manager if it exists. Do not set directlyWizardStep[][]

Methods

getWizardElement() => Promise<HTMLBwWizardElement>

Returns the inner HTMLBwWizardElement

Returns

Type: Promise<HTMLBwWizardElement>

Slots

SlotDescription
Pass the main content of the view in the default slot
"footer"pass bw-buttons in here, they will appear in a sticky footer at the bottom of the view
"header"The entire header is wrapped in this slot. If you pass in this slot manually, you will overwrite the entire header of the view with your custom markup
"header-end"Items placed here will show up at the end of the header and before the close button
"header-start"Items placed here will show up before the label
"label"You can override the header label with this slot
"options"Items placed here will show in a popover at the end of the header. You should only pass in bw-options

Dependencies

Used by

Depends on

Graph


© 2025 United Systems & Software - All Rights Reserved.