Getting Started
Overview
Installation
Theme
Forms
Basic Inputs
Custom Inputs
Select
Components
Components
78
Micro Charts
Navigation
Libraries
Content Editor
Data View
Form Builder
Headless Editor
Image Designer
Kanban Board
PDF Builder
PDF Signer
PDF Viewer
Video Player
GitHub repositoryGitHub starsGitHub forksNgStarter UI npm versionNgStarter UI npm downloads per month

Layout

Layout structures both full viewport application shells and local workspaces such as editors, settings, and detail pages. It defines the main screen regions: topbar, header, subheader, sidebar, content, aside, and footer.

Use root for the application shell and non-root layouts for local workspaces 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, subheader, sidebar, content, aside, and footer.
  • Root mode for full viewport shells and absolute mode to fill a positioned parent.
  • 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
absolute
Fill a positioned parent with absolute positioning
booleanfalse
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-aside
  • ngs-layout-sidebar
  • ngs-layout-topbar

Header, subheader, and footer

ngs-layout-header and ngs-layout-subheader accept boolean flex and autoHeight inputs. ngs-layout-footer accepts block and autoHeight. These inputs default to false. Heights default to 3.5rem and can be overridden through height utility classes or --ngs-layout-header-height, --ngs-layout-subheader-height, and --ngs-layout-footer-height. Set autoHeight to size the region to its content.