Skip to content

Panel

Last updated 12 Nov 2026

NbPanel is a surface container that groups related content inside a styled card. It provides a consistent background, border, and spacing out of the box.

Depth is derived from nesting ​

A panel inside a panel paints one layer deeper on its own. Nothing names a depth, and the count is clamped at layer 3.

Use the layer prop, or a .nb-layer-{0-3} class, only to pin or reset a level. See Theming, Layers for when that is worth doing.

vue
<NbPanel :layer="0" />

A flat panel ​

flat keeps the border and the padding and paints nothing: the panel sits on the plane around it. It does not deepen its contents either, so a panel inside a flat panel paints the level a sibling of the flat one would.

Panels are commonly used as a container for modal or form action buttons, keeping them visually separated from the main content.

vue
<template>
  <NbPanel>
    <NbGrid dir="row" gap="sm" justify="end">
      <NbButton variant="ghost">Cancel</NbButton>
      <NbButton variant="primary">Save</NbButton>
    </NbGrid>
  </NbPanel>
</template>

Slots ​

SlotDescription
defaultAny content to render inside Panel
metaBeside the title: a count, an NbInfoHint. Renders the header.
actionsAt the end of the header: the panel's one filled button, and quiet ones beside it. Renders the header.

Props ​

PropTypeDefaultDescription
layer0 | 1 | 2 | 3undefinedPins the panel to an absolute layer. Leave unset to derive the level from nesting.
titlestringundefinedThe panel's title, in a header at heading-01. Unset (with no description, meta or actions), the panel renders no header.
iconTIconSourceundefinedA muted 20px icon before the title. Decorative.
descriptionstringundefinedOne line of support under the title, body-sm muted.
headingLevel'h1' to 'h6''h2'The element the title renders as. Match the page outline.
flatbooleanfalseKeep the border and padding, paint no surface, and do not deepen the contents.

Beyond the layer it paints, NbPanel is a layout container. Use CSS custom properties or inline styles to customize appearance.