Page Aside
Page Aside component
Install
npx ui8kit add page-asidePulls in: box, compose, group, kit-box, kit-text, lucide-icon, page-trail, stack, text, utils
Preview
12,400
Sites published
since launch
99.99%
Uptime
last 12 months
3,200
Teams
in 60 countries
0.8s
Median load
on a mobile network
Code
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework svelte --dir src --registry-url https://registry.buildy.tw/svelte --strict-cdnnpx ui8kit add page-aside<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
The aside at the end of a page head: one large figure with its caption, a note card with a glyph, or four key
facts as cards in two columns.
-->
<script lang="ts" module>
import type { Snippet } from "svelte";
import type { PageExtras } from "../blocks/page-trail.types";
export type PageAsideProps = {
extras: PageExtras;
mode?: "none" | "figure" | "note" | "facts";
};
</script>
<script lang="ts">
import Box from "../compose/Box.svelte";
import Group from "../compose/Group.svelte";
import LucideIcon from "../icons/LucideIcon.svelte";
import Stack from "../compose/Stack.svelte";
import Text from "../compose/Text.svelte";
let { extras, mode = "figure" }: PageAsideProps = $props();
</script>
{#if ((mode as string) === "figure")}
<Stack gap="0" align="end" class="text-end" data-slot="page-figure">
<Text size="4xl" weight="bold">
{extras.value}
</Text>
<Text size="xs" class="text-muted-foreground">
{extras.caption}
</Text>
</Stack>
{/if}
{#if ((mode as string) === "note")}
<Group
gap="4"
align="start"
class="rounded bg-card inset-ring inset-ring-border max-w-xs p-4"
data-slot="page-note"
>
<LucideIcon name={extras.icon} size={20} />
<Stack gap="0">
<Text size="lg" weight="bold">
{extras.value}
</Text>
<Text size="sm" weight="medium">
{extras.caption}
</Text>
<Text size="xs" class="text-muted-foreground">
{extras.note}
</Text>
</Stack>
</Group>
{/if}
{#if ((mode as string) === "facts")}
<Box class="grid grid-cols-2 gap-4" data-slot="page-aside">
{#each extras.facts as s, i (s.id)}
{#if (i < 4)}
<Stack gap="0" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="page-fact">
<Text size="lg" weight="bold">
{s.value}
</Text>
<Text size="xs" weight="medium">
{s.label}
</Text>
<Text size="xs" class="text-muted-foreground">
{s.hint}
</Text>
</Stack>
{/if}
{/each}
</Box>
{/if}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework react --dir src --registry-url https://registry.buildy.tw/react --strict-cdnnpx ui8kit add page-aside// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* The aside at the end of a page head: one large figure with its caption, a note card with a glyph, or four key
* facts as cards in two columns.
*/
import { Fragment, type ReactNode } from "react";
import { Box, Group, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import type { PageExtras } from "../blocks/page-trail.types";
export type PageAsideProps = {
extras: PageExtras;
mode?: "none" | "figure" | "note" | "facts";
};
export function PageAside({ extras, mode = "figure" }: PageAsideProps) {
return (
<>
{((mode as string) === "figure") ? (
<Stack gap="0" align="end" className="text-end" data-slot="page-figure">
<Text size="4xl" weight="bold">
{extras.value}
</Text>
<Text size="xs" className="text-muted-foreground">
{extras.caption}
</Text>
</Stack>
) : null}
{((mode as string) === "note") ? (
<Group
gap="4"
align="start"
className="rounded bg-card inset-ring inset-ring-border max-w-xs p-4"
data-slot="page-note"
>
<LucideIcon name={extras.icon} size={20} />
<Stack gap="0">
<Text size="lg" weight="bold">
{extras.value}
</Text>
<Text size="sm" weight="medium">
{extras.caption}
</Text>
<Text size="xs" className="text-muted-foreground">
{extras.note}
</Text>
</Stack>
</Group>
) : null}
{((mode as string) === "facts") ? (
<Box className="grid grid-cols-2 gap-4" data-slot="page-aside">
{(extras.facts ?? []).map((s, i) => (
<Fragment key={s.id}>
{(i < 4) ? (
<Stack gap="0" className="rounded bg-card inset-ring inset-ring-border p-4" data-slot="page-fact">
<Text size="lg" weight="bold">
{s.value}
</Text>
<Text size="xs" weight="medium">
{s.label}
</Text>
<Text size="xs" className="text-muted-foreground">
{s.hint}
</Text>
</Stack>
) : null}
</Fragment>
))}
</Box>
) : null}
</>
);
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework vue --dir src --registry-url https://registry.buildy.tw/vue --strict-cdnnpx ui8kit add page-aside<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
The aside at the end of a page head: one large figure with its caption, a note card with a glyph, or four key
facts as cards in two columns.
-->
<script lang="ts">
import type { PageExtras } from "../blocks/page-trail.types";
export type PageAsideProps = {
extras: PageExtras;
mode?: "none" | "figure" | "note" | "facts";
};
</script>
<script setup lang="ts">
import Box from "../compose/Box.vue";
import Group from "../compose/Group.vue";
import LucideIcon from "../icons/LucideIcon.vue";
import Stack from "../compose/Stack.vue";
import Text from "../compose/Text.vue";
const { extras, mode = "figure" } = defineProps<PageAsideProps>();
</script>
<template>
<Stack v-if="((mode as string) === 'figure')" gap="0" align="end" class="text-end" data-slot="page-figure">
<Text size="4xl" weight="bold">
{{ extras.value }}
</Text>
<Text size="xs" class="text-muted-foreground">
{{ extras.caption }}
</Text>
</Stack>
<Group v-if="((mode as string) === 'note')"
gap="4"
align="start"
class="rounded bg-card inset-ring inset-ring-border max-w-xs p-4"
data-slot="page-note"
>
<LucideIcon :name="extras.icon" :size="20" />
<Stack gap="0">
<Text size="lg" weight="bold">
{{ extras.value }}
</Text>
<Text size="sm" weight="medium">
{{ extras.caption }}
</Text>
<Text size="xs" class="text-muted-foreground">
{{ extras.note }}
</Text>
</Stack>
</Group>
<Box v-if="((mode as string) === 'facts')" class="grid grid-cols-2 gap-4" data-slot="page-aside">
<template v-for="(s, i) in extras.facts" :key="s.id">
<Stack v-if="(i < 4)" gap="0" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="page-fact">
<Text size="lg" weight="bold">
{{ s.value }}
</Text>
<Text size="xs" weight="medium">
{{ s.label }}
</Text>
<Text size="xs" class="text-muted-foreground">
{{ s.hint }}
</Text>
</Stack>
</template>
</Box>
</template>
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework solid --dir src --registry-url https://registry.buildy.tw/solid --strict-cdnnpx ui8kit add page-aside// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* The aside at the end of a page head: one large figure with its caption, a note card with a glyph, or four key
* facts as cards in two columns.
*/
import { For, type JSX } from "solid-js";
import { Box, Group, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import type { PageExtras } from "../blocks/page-trail.types";
export type PageAsideProps = {
extras: PageExtras;
mode?: "none" | "figure" | "note" | "facts";
};
export function PageAside({ extras, mode = "figure" }: PageAsideProps) {
return (
<>
{((mode as string) === "figure") ? (
<Stack gap="0" align="end" class="text-end" data-slot="page-figure">
<Text size="4xl" weight="bold">
{extras.value}
</Text>
<Text size="xs" class="text-muted-foreground">
{extras.caption}
</Text>
</Stack>
) : null}
{((mode as string) === "note") ? (
<Group
gap="4"
align="start"
class="rounded bg-card inset-ring inset-ring-border max-w-xs p-4"
data-slot="page-note"
>
<LucideIcon name={extras.icon} size={20} />
<Stack gap="0">
<Text size="lg" weight="bold">
{extras.value}
</Text>
<Text size="sm" weight="medium">
{extras.caption}
</Text>
<Text size="xs" class="text-muted-foreground">
{extras.note}
</Text>
</Stack>
</Group>
) : null}
{((mode as string) === "facts") ? (
<Box class="grid grid-cols-2 gap-4" data-slot="page-aside">
<For each={extras.facts ?? []}>{(s, iOf) => { const i = iOf(); return (
<>
{(i < 4) ? (
<Stack gap="0" class="rounded bg-card inset-ring inset-ring-border p-4" data-slot="page-fact">
<Text size="lg" weight="bold">
{s.value}
</Text>
<Text size="xs" weight="medium">
{s.label}
</Text>
<Text size="xs" class="text-muted-foreground">
{s.hint}
</Text>
</Stack>
) : null}
</>
); }}</For>
</Box>
) : null}
</>
);
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework templ --dir src --registry-url https://registry.buildy.tw/templ --strict-cdnnpx ui8kit add page-aside// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
// Source: packages/compose-gen/specs/organisms/page-aside.json
package blocks
import (
"github.com/ui8kit/codegen/generated/templ/ui/box"
"github.com/ui8kit/codegen/generated/templ/compose"
"github.com/ui8kit/codegen/generated/templ/icons"
"github.com/ui8kit/codegen/generated/templ/ui/text"
uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)
// PageAsideProps are the props of PageAside; the values are the JSON shapes of the TypeScript props.
type PageAsideProps struct {
Extras any `json:"extras"`
Mode any `json:"mode"`
}
// The aside at the end of a page head: one large figure with its caption, a note card with a glyph, or four key facts as cards in two columns.
templ PageAside(p PageAsideProps) {
{{ vExtras := p.Extras }}
{{ vMode := uiutils.Def(p.Mode, "figure") }}
if uiutils.Eq(vMode, "figure") {
@compose.Stack(compose.StackProps{Gap: "0", Align: "end", BoxProps: box.BoxProps{Class: "text-end", Attrs: uiutils.Attrs("data-slot", "page-figure")}}) {
@compose.Text(compose.TextProps{Size: "4xl", Weight: "bold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vExtras, "value")) }
}
@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vExtras, "caption")) }
}
}
}
if uiutils.Eq(vMode, "note") {
@compose.Group(compose.GroupProps{Gap: "4", Align: "start", BoxProps: box.BoxProps{Class: "rounded bg-card inset-ring inset-ring-border max-w-xs p-4", Attrs: uiutils.Attrs("data-slot", "page-note")}}) {
@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vExtras, "icon")), Size: 20})
@compose.Stack(compose.StackProps{Gap: "0", BoxProps: box.BoxProps{}}) {
@compose.Text(compose.TextProps{Size: "lg", Weight: "bold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vExtras, "value")) }
}
@compose.Text(compose.TextProps{Size: "sm", Weight: "medium", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vExtras, "caption")) }
}
@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vExtras, "note")) }
}
}
}
}
if uiutils.Eq(vMode, "facts") {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "grid grid-cols-2 gap-4", Attrs: uiutils.Attrs("data-slot", "page-aside")}}) {
for vI, vS := range uiutils.L(uiutils.Get(vExtras, "facts")) {
if uiutils.Lt(float64(vI), float64(4)) {
@compose.Stack(compose.StackProps{Gap: "0", BoxProps: box.BoxProps{Class: "rounded bg-card inset-ring inset-ring-border p-4", Attrs: uiutils.Attrs("data-slot", "page-fact")}}) {
@compose.Text(compose.TextProps{Size: "lg", Weight: "bold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vS, "value")) }
}
@compose.Text(compose.TextProps{Size: "xs", Weight: "medium", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vS, "label")) }
}
@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vS, "hint")) }
}
}
}
}
}
}
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework twig --dir src --registry-url https://registry.buildy.tw/twig --strict-cdnnpx ui8kit add page-aside{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/organisms/page-aside.json
The aside at the end of a page head: one large figure with its caption, a note card with a glyph, or four key facts as cards in two columns.
Props (p): extras, mode. -#}
{%- set v_extras = (p.extras ?? null) -%}
{%- set v_mode = (p.mode ?? 'figure') -%}
{%- if og_t(og_eq(v_mode, 'figure')) %}
{%- set c_3 -%}
{%- set c_1 -%}
{{ og_text(og_get(v_extras, ['value'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': '4xl', 'weight': 'bold', 'children': c_1}, with_context = false) }}
{%- set c_2 -%}
{{ og_text(og_get(v_extras, ['caption'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '0', 'align': 'end', 'class': 'text-end', 'attrs': og_attrs(['data-slot', 'page-figure']), 'children': c_3}, with_context = false) }}
{%- endif %}
{%- if og_t(og_eq(v_mode, 'note')) %}
{%- set c_8 -%}
{{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_extras, ['icon'])), 'size': 20}, with_context = false) }}
{%- set c_7 -%}
{%- set c_4 -%}
{{ og_text(og_get(v_extras, ['value'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'lg', 'weight': 'bold', 'children': c_4}, with_context = false) }}
{%- set c_5 -%}
{{ og_text(og_get(v_extras, ['caption'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'medium', 'children': c_5}, with_context = false) }}
{%- set c_6 -%}
{{ og_text(og_get(v_extras, ['note'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_6}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '0', 'children': c_7}, with_context = false) }}
{%- endset -%}
{{ include('compose/Group.html.twig', {'gap': '4', 'align': 'start', 'class': 'rounded bg-card inset-ring inset-ring-border max-w-xs p-4', 'attrs': og_attrs(['data-slot', 'page-note']), 'children': c_8}, with_context = false) }}
{%- endif %}
{%- if og_t(og_eq(v_mode, 'facts')) %}
{%- set c_13 -%}
{%- for v_s in og_l(og_get(v_extras, ['facts'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 4)) %}
{%- set c_12 -%}
{%- set c_9 -%}
{{ og_text(og_get(v_s, ['value'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'lg', 'weight': 'bold', 'children': c_9}, with_context = false) }}
{%- set c_10 -%}
{{ og_text(og_get(v_s, ['label'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'xs', 'weight': 'medium', 'children': c_10}, with_context = false) }}
{%- set c_11 -%}
{{ og_text(og_get(v_s, ['hint'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_11}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '0', 'class': 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs': og_attrs(['data-slot', 'page-fact']), 'children': c_12}, with_context = false) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'grid grid-cols-2 gap-4', 'attrs': og_attrs(['data-slot', 'page-aside']), 'children': c_13}, with_context = false) }}
{%- endif %}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework latte --dir src --registry-url https://registry.buildy.tw/latte --strict-cdnnpx ui8kit add page-aside{* Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/organisms/page-aside.json
The aside at the end of a page head: one large figure with its caption, a note card with a glyph, or four key facts as cards in two columns.
Props (p): extras, mode. *}
{var $v_extras = ($p['extras'] ?? null)}
{var $v_mode = ($p['mode'] ?? 'figure')}
{if og_t(og_eq($v_mode, 'figure'))}
{capture $c_3}
{capture $c_1}
{=og_text(og_get($v_extras, ['value']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => '4xl', 'weight' => 'bold', 'children' => (string) $c_1])|noescape}
{capture $c_2}
{=og_text(og_get($v_extras, ['caption']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_2])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '0', 'align' => 'end', 'class' => 'text-end', 'attrs' => og_attrs(['data-slot', 'page-figure']), 'children' => (string) $c_3])|noescape}
{/if}
{if og_t(og_eq($v_mode, 'note'))}
{capture $c_8}
{=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_extras, ['icon'])), 'size' => 20])|noescape}
{capture $c_7}
{capture $c_4}
{=og_text(og_get($v_extras, ['value']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'lg', 'weight' => 'bold', 'children' => (string) $c_4])|noescape}
{capture $c_5}
{=og_text(og_get($v_extras, ['caption']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'medium', 'children' => (string) $c_5])|noescape}
{capture $c_6}
{=og_text(og_get($v_extras, ['note']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_6])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '0', 'children' => (string) $c_7])|noescape}
{/capture}
{=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'start', 'class' => 'rounded bg-card inset-ring inset-ring-border max-w-xs p-4', 'attrs' => og_attrs(['data-slot', 'page-note']), 'children' => (string) $c_8])|noescape}
{/if}
{if og_t(og_eq($v_mode, 'facts'))}
{capture $c_13}
{foreach og_l(og_get($v_extras, ['facts'])) as $v_s}
{var $v_i = $iterator->counter0}
{if og_t(og_lt($v_i, 4))}
{capture $c_12}
{capture $c_9}
{=og_text(og_get($v_s, ['value']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'lg', 'weight' => 'bold', 'children' => (string) $c_9])|noescape}
{capture $c_10}
{=og_text(og_get($v_s, ['label']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'xs', 'weight' => 'medium', 'children' => (string) $c_10])|noescape}
{capture $c_11}
{=og_text(og_get($v_s, ['hint']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_11])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '0', 'class' => 'rounded bg-card inset-ring inset-ring-border p-4', 'attrs' => og_attrs(['data-slot', 'page-fact']), 'children' => (string) $c_12])|noescape}
{/if}
{/foreach}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'grid grid-cols-2 gap-4', 'attrs' => og_attrs(['data-slot', 'page-aside']), 'children' => (string) $c_13])|noescape}
{/if}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework jinja2 --dir src --registry-url https://registry.buildy.tw/jinja2 --strict-cdnnpx ui8kit add page-aside{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/organisms/page-aside.json
The aside at the end of a page head: one large figure with its caption, a note card with a glyph, or four key facts as cards in two columns.
Props (p): extras, mode. -#}
{%- set v_extras = og_def(p['extras'], none) -%}
{%- set v_mode = og_def(p['mode'], 'figure') -%}
{%- if og_t(og_eq(v_mode, 'figure')) %}
{%- set c_3 -%}
{%- set c_1 -%}
{{ og_text(og_get(v_extras, ['value'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': '4xl', 'Weight': 'bold'}, 'children': c_1}) }}
{%- set c_2 -%}
{{ og_text(og_get(v_extras, ['caption'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '0', 'Align': 'end', 'Class': 'text-end', 'Attrs': og_attrs(['data-slot', 'page-figure'])}, 'children': c_3}) }}
{%- endif %}
{%- if og_t(og_eq(v_mode, 'note')) %}
{%- set c_8 -%}
{{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_extras, ['icon'])), 'Size': 20}}) }}
{%- set c_7 -%}
{%- set c_4 -%}
{{ og_text(og_get(v_extras, ['value'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'lg', 'Weight': 'bold'}, 'children': c_4}) }}
{%- set c_5 -%}
{{ og_text(og_get(v_extras, ['caption'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'medium'}, 'children': c_5}) }}
{%- set c_6 -%}
{{ og_text(og_get(v_extras, ['note'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_6}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '0'}, 'children': c_7}) }}
{%- endset -%}
{{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'start', 'Class': 'rounded bg-card inset-ring inset-ring-border max-w-xs p-4', 'Attrs': og_attrs(['data-slot', 'page-note'])}, 'children': c_8}) }}
{%- endif %}
{%- if og_t(og_eq(v_mode, 'facts')) %}
{%- set c_13 -%}
{%- for v_s in og_l(og_get(v_extras, ['facts'])) %}
{%- set v_i = loop.index0 -%}
{%- if og_t(og_lt(v_i, 4)) %}
{%- set c_12 -%}
{%- set c_9 -%}
{{ og_text(og_get(v_s, ['value'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'lg', 'Weight': 'bold'}, 'children': c_9}) }}
{%- set c_10 -%}
{{ og_text(og_get(v_s, ['label'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Weight': 'medium'}, 'children': c_10}) }}
{%- set c_11 -%}
{{ og_text(og_get(v_s, ['hint'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_11}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '0', 'Class': 'rounded bg-card inset-ring inset-ring-border p-4', 'Attrs': og_attrs(['data-slot', 'page-fact'])}, 'children': c_12}) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'grid grid-cols-2 gap-4', 'Attrs': og_attrs(['data-slot', 'page-aside'])}, 'children': c_13}) }}
{%- endif %}
Props
Names and types come from the xgen specs of the source. Standard HTML attributes (id, role, tabIndex, aria-*) pass through to the root element; the class prop is className in React.
The aside at the end of a page head: one large figure with its caption, a note card with a glyph, or four key facts as cards in two columns.
| Prop | Type | Default | Description |
|---|---|---|---|
| extras (required) | PageExtras | - | |
| mode | "none" | "figure" | "note" | "facts" | "figure" |