<template>
<NbPanel>
<p>Simple panel with default styling.</p>
</NbPanel>
</template>A header
Give a panel a title and it renders a header: the title at heading-01, a description under it, a meta slot beside the title for a count or an info hint, and an actions slot at the end for the panel's one filled button. The title size is fixed by the component, so two panels on one page cannot drift apart. A panel without any of these renders no header at all.
<NbPanel title="Members" description="Everyone who can open this project.">
<template #meta><NbBadge size="sm" variant="grey">4</NbBadge></template>
<template #actions>
<NbButton size="sm" variant="primary">Invite</NbButton>
</template>
...
</NbPanel>icon draws a small muted icon before the title, and an NbInfoHint in meta sits right after it:
<NbPanel title="Members" icon="users">
<template #meta><NbInfoHint text="Everyone who can open this project." /></template>
...
</NbPanel>One filled button per header: a second primary in the same actions slot warns in development. See Information hierarchy.
On a phone
On a phone the header wraps. Actions that fit beside the title stay there, so a short title with one icon button looks as it does on a desktop. When the title needs the room, the actions drop to a line of their own under it, at the start, and the title keeps its whole line instead of breaking after every word. Nothing changes on a desktop, and there is nothing to set: it follows the library's phone signal (see What the library does on a phone).
Raised or flat
A panel is raised: it paints the next plane, and that says "this is a group". A page has at most one raised region, the thing it is for. Supporting tiles sit on the ground with flat, which keeps the border and padding and paints no surface.
Nesting content
Panels accept any slotted content, including other components.