A record page
vue
<template>
<NbPageHeader :title="record.title">...</NbPageHeader>
<NbPageLayout aside-width="2:1" aside-first>
<NbPanel title="Work">...</NbPanel>
<template #aside>
<NbPanel flat title="Facts">...</NbPanel>
</template>
</NbPageLayout>
</template>A fixed aside
vue
<NbPageLayout aside-width="14rem" gap="lg">...</NbPageLayout>Replacing a hand-written split
scss
// Before: a viewport query inside the shell, against the layout rules.
.view__grid {
display: grid;
grid-template-columns: minmax(0, 3fr) minmax(18rem, 2fr);
gap: var(--nb-spacing-24);
@media (max-width: 64rem) {
grid-template-columns: 1fr;
}
}vue
<!-- After -->
<NbPageLayout gap="lg">...</NbPageLayout>Props
| Prop | Type | Default | Description |
|---|---|---|---|
asideWidth | string | '3:2' | A ratio of main to aside, or a CSS length for a fixed aside. |
stackBelow | 'sm' | 'md' | 'lg' | 'md' | Container width below which the regions stack: 480, 720 or 960px. |
asideFirst | boolean | false | Stacked, put the aside first. |
gap | TGapSize | 'xl' | Space between the regions, on NbGrid's scale. |
Slots
| Slot | Description |
|---|---|
default | The main region. |
aside | The aside. |