Getting Started
Overview
Installation
Theme
Forms
Basic Inputs
Select
Custom Inputs
Components
Navigation
Components
69
Micro Charts
Libraries
Kanban Board
Image Designer
Video Player
Visual Builder
Content Editor
Data View
Latest npm version of @ngstarter-ui/componentsWeekly npm downloads of @ngstarter-ui/components
Purchase

Layout

Layout is the base top-level shell for an application, admin area, dashboard, or large workspace page. It defines the main screen regions: topbar, header, sidebar, content, aside, and footer.

Use it when the whole screen needs a stable structural frame with managed height, nested layouts, scrollable content, and an optional sidebar that can be shown, hidden, or toggled through LayoutApiService.

Key Features:
  • Semantic regions for topbar, header, sidebar, content, aside, and footer.
  • A root mode for full viewport application shells.
  • Nested layouts for complex admin and workspace screens.
  • Built-in content scrolling with optional auto-scroll to top on navigation.
  • Sidebar visibility control by layoutId through LayoutApiService.

Do not use Layout as a small wrapper, card, spacing helper, form grouping tool, or generic grid system. Use TailwindCSS grid, flex, and spacing classes inside layout regions. Use Grid for static dashboard widgets, Tiles for dashboards users can rearrange or customize, DataView or Table for datasets, Drawer for overlay side panels, and navigation components inside sidebars.

ngs-layout

PropTypeDefault
layoutId
Unique identifier for the layout
stringlayout-n
root
Whether this is the root layout
booleanfalse

ngs-layout-content

PropTypeDefault
autoscrollToTop
Whether to automatically scroll to top on navigation
booleantrue

Other Components

The following components do not have any specific inputs or outputs:

  • ngs-layout-header
  • ngs-layout-footer
  • ngs-layout-aside
  • ngs-layout-sidebar
  • ngs-layout-topbar