Skip to content

Slots / Code Injection ​

Reference for BetterForms slot names and where each slot renders in the app UI.

Slots are reusable HTML or Vue template insertion points that let you customize the BetterForms app shell and page wrapper without editing the core application code.

To edit slots in the IDE, go to:

  • Styling > Slots

Reference ​

Slot NameWhere it rendersNotes
headerStandalone app-level header area rendered below the top navigation barApp-shell level slot handled separately from the named header-bar slots
headerBrandLeftLeft of the brand/logo area in the top navigation barHeader-bar slot
headerBrandBrand / app-name area in the top navigation barReplaces the default app-name block
headerSidebarToggleSidebar toggle area in the top navigation barReplaces the default left-nav toggle button
headerLeftLeft-side header content areaHeader-bar slot
headerCenterCenter header content areaCurrent runtime slot name; use this instead of older headerMiddle wording
headerRightRight-side header content areaHeader-bar slot
logoutLogout area in the top navigation barOnly shown when the user is authenticated
sidebarLeftTopAbove the left navigation menu itemsSidebar slot
sidebarLeftBottomBelow the left navigation menu itemsSidebar slot
sidebarLeftFooterFooter area of the left navigation barOften used for logos or custom footer content
formHeaderAbove the current page bodyPage-wrapper slot inside the form layout
formFooterBelow the current page bodyPage-wrapper slot inside the form layout
appFooterFooter area of the overall app shellApp-shell level footer slot

Notes ​

  • Slots can replace or extend default shell content depending on where they are inserted.
  • logout is a conditional slot because the default logout control only renders for authenticated users.
  • formHeader and formFooter are page-wrapper slots, so they render around the current page content rather than inside the top navigation or sidebar.
  • appFooter renders at the app-shell level and is separate from page-level footer content.

Advanced Note ​

Some slot templates can access runtime browser-side objects such as window.formGen, depending on where the slot is rendered and what page context is currently active.

Treat that as advanced behavior:

  • it is useful for custom dynamic templates
  • it should not be the main mental model for learning slots
  • if you rely on it heavily, document the expected page context clearly in your own implementation notes

Klai Studio documentation