Product pages: Home
7 sections between the top bar and the footer of the template.
Install
The blocks of this page, top bar and footer included:
npx ui8kit add nav-bar hero-classic feature-grid feature-split feature-showcase bento-grid feature-tabs feature-accordion sitemap-footerBlocks: nav-bar, hero-classic, feature-grid, feature-split, feature-showcase, bento-grid, feature-tabs, feature-accordion, sitemap-footer
Preview
The sections of the page; the top bar and the footer have their own block pages.
Features of our service
View AllFast by default
Pages render from static data and ship little script.
Clear structure
One heading per page, landmarks and a skip link come built in.
Safe forms
Inputs carry labels and errors are announced to assistive tools.
Ready for any language
Every text lives in a dictionary, so a new language is one more file.
Built for teams that ship
Everything you need to plan, build and publish, in one place.
12,400
Sites published
since launch
99.99%
Uptime
last 12 months
3,200
Teams
in 60 countries
0.8 s
Median load
on a mobile network
Everything in one place
Each part does one job well, and they all work together.
Fast by default
Pages render from static data and ship little script.
Clear structure
One heading per page, landmarks and a skip link come built in.
Safe forms
Inputs carry labels and errors are announced to assistive tools.
Ready for any language
Every text lives in a dictionary, so a new language is one more file.
Everything in one place
Fast by default
Pages ship little script and load in under a second.
Ready blocks
Compose a page from tested blocks and variants.
Accessible
Landmarks, labels and focus order are checked.
Light and dark
Every block follows the theme tokens.
One source of data
Pages read collections, never copies.
Private by default
Your data stays in your collections.
Export anywhere
Take pages and data with you.
One product, many jobs
Clear structure
One heading per page, landmarks and a skip link come built in.
Questions about the features
Fast by default
Pages render from static data and ship little script.
Clear structure
One heading per page, landmarks and a skip link come built in.
Safe forms
Inputs carry labels and errors are announced to assistive tools.
Ready for any language
Every text lives in a dictionary, so a new language is one more file.
Code
The page as generated in the source monorepo (commit 6c20aba1e4be). It imports the blocks from the UI package and its texts and sample data from the app package; after installing the blocks, replace those imports with your own content.
Point the CLI at this runtime once, then add the blocks:
npx ui8kit init --yes --framework svelte --dir src --registry-url https://registry.buildy.tw/svelte --strict-cdnnpx ui8kit add nav-bar hero-classic feature-grid feature-split feature-showcase bento-grid feature-tabs feature-accordion sitemap-footer<!-- Code generated by xgen. DO NOT EDIT. -->
<!-- Source: xgen/specs/screens/theme-marketing-product.json -->
<!-- The home page of ThemeMarketingProductScreen. -->
<script lang="ts">
import {
BentoGrid,
FeatureAccordion,
FeatureGrid,
FeatureShowcase,
FeatureSplit,
FeatureTabs,
HeroClassic,
tpl,
uniqLabel,
type CodeLine,
type Feature,
type Stat,
type Tile,
} from "@ui8kit/svelte-ui";
import { fromCodex } from "@ui8kit/app-shared/runtime/core";
import { ui } from "@ui8kit/app-shared/content";
import { terminal as terminalEntries } from "@ui8kit/app-shared/data/terminal";
import { features as featuresEntries } from "@ui8kit/app-shared/data/features";
import { stats as statsEntries } from "@ui8kit/app-shared/data/stats";
import { bento as bentoEntries } from "@ui8kit/app-shared/data/bento";
const TERMINAL_FIELDS = {"id":"id","text":"title.en","kind":"metadata.kind.value"} as const;
const FEATURES_FIELDS = {"id":"id","title":"title.en","text":"metadata.text.value","icon":"metadata.icon.value"} as const;
const STATS_FIELDS = {"id":"id","label":"title.en","value":"metadata.value.value","icon":"metadata.icon.value","hint":"metadata.hint.value"} as const;
const BENTO_FIELDS = {"id":"id","title":"title.en","text":"metadata.text.value","icon":"metadata.icon.value","size":"metadata.size.value"} as const;
const terminal = fromCodex<CodeLine>(terminalEntries, TERMINAL_FIELDS);
const features = fromCodex<Feature>(featuresEntries, FEATURES_FIELDS);
const stats = fromCodex<Stat>(statsEntries, STATS_FIELDS);
const bento = fromCodex<Tile>(bentoEntries, BENTO_FIELDS);
</script>
<HeroClassic
id="home-hero"
title={ui.pages.marketingProduct.home.title}
text={ui.pages.marketingProduct.home.text}
actions={{
cta: ui.pages.marketingProduct.home.cta,
href: "#/tour",
secondary: ui.site.home.secondary,
secondaryHref: "#/pricing",
emailLabel: ui.promo.newsletter.label,
mode: "one",
}}
media={{
codeTitle: ui.vibe.code.title,
prompt: ui.vibe.code.prompt,
lines: terminal,
kind: "image",
side: "end",
}}
layout="split"
scale="default"
tone="default"
density="roomy"
/>
<FeatureGrid
id="home-features"
title={ui.site.home.featuresTitle}
features={features}
action={{ label: ui.site.home.featuresAction, href: "#/" }}
layout="grid"
cols="1-3"
item="card"
mediaSide="end"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.features, ui.blocks.variants.features.grid))}
/>
<FeatureSplit
id="home-featuresplit"
title={ui.marketing.featureSplit.title}
lead={ui.marketing.featureSplit.lead}
badge={ui.marketing.featureSplit.badge}
features={features}
stats={stats}
actions={{
mode: "two",
cta: ui.marketing.featureSplit.cta,
href: "#/start",
secondary: ui.marketing.featureSplit.secondary,
secondaryHref: "#/work",
}}
layout="metrics"
mediaSide="end"
tone="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featuresplit, ui.blocks.variants.featuresplit.metricCards))}
/>
<FeatureShowcase
id="home-featureshowcase"
title={ui.marketing.featureShowcase.title}
lead={ui.marketing.featureShowcase.lead}
features={features}
more={ui.marketing.featureShowcase.more}
item="panel"
cols="4"
tone="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featureshowcase, ui.blocks.variants.featureshowcase.panelCards4))}
/>
<BentoGrid
id="home-bento"
title={ui.vibe.bento.title}
tiles={bento}
layout="bento"
media="image"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.bento, ui.blocks.variants.bento.images))}
/>
<FeatureTabs
id="home-featuretabs"
title={ui.vibe.tabs.title}
features={features}
tabsLabel={ui.vibe.tabs.label}
active="feature-clear"
panel="split"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featuretabs, ui.blocks.variants.featuretabs.split))}
/>
<FeatureAccordion
id="home-accordion"
title={ui.vibe.accordion.title}
features={features}
expand="first"
media="image"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.accordion, ui.blocks.variants.accordion.media))}
/>
Point the CLI at this runtime once, then add the blocks:
npx ui8kit init --yes --framework react --dir src --registry-url https://registry.buildy.tw/react --strict-cdnnpx ui8kit add nav-bar hero-classic feature-grid feature-split feature-showcase bento-grid feature-tabs feature-accordion sitemap-footer// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/screens/theme-marketing-product.json
// The home page of ThemeMarketingProductScreen.
import {
BentoGrid,
FeatureAccordion,
FeatureGrid,
FeatureShowcase,
FeatureSplit,
FeatureTabs,
HeroClassic,
tpl,
uniqLabel,
type CodeLine,
type Feature,
type Stat,
type Tile,
} from "@ui8kit/react-ui";
import { fromCodex } from "@ui8kit/app-shared/runtime/core";
import { ui } from "@ui8kit/app-shared/content";
import { terminal as terminalEntries } from "@ui8kit/app-shared/data/terminal";
import { features as featuresEntries } from "@ui8kit/app-shared/data/features";
import { stats as statsEntries } from "@ui8kit/app-shared/data/stats";
import { bento as bentoEntries } from "@ui8kit/app-shared/data/bento";
const TERMINAL_FIELDS = {"id":"id","text":"title.en","kind":"metadata.kind.value"} as const;
const FEATURES_FIELDS = {"id":"id","title":"title.en","text":"metadata.text.value","icon":"metadata.icon.value"} as const;
const STATS_FIELDS = {"id":"id","label":"title.en","value":"metadata.value.value","icon":"metadata.icon.value","hint":"metadata.hint.value"} as const;
const BENTO_FIELDS = {"id":"id","title":"title.en","text":"metadata.text.value","icon":"metadata.icon.value","size":"metadata.size.value"} as const;
const terminal = fromCodex<CodeLine>(terminalEntries, TERMINAL_FIELDS);
const features = fromCodex<Feature>(featuresEntries, FEATURES_FIELDS);
const stats = fromCodex<Stat>(statsEntries, STATS_FIELDS);
const bento = fromCodex<Tile>(bentoEntries, BENTO_FIELDS);
export function HomePage() {
return (
<>
<HeroClassic
id="home-hero"
title={ui.pages.marketingProduct.home.title}
text={ui.pages.marketingProduct.home.text}
actions={{
cta: ui.pages.marketingProduct.home.cta,
href: "#/tour",
secondary: ui.site.home.secondary,
secondaryHref: "#/pricing",
emailLabel: ui.promo.newsletter.label,
mode: "one",
}}
media={{
codeTitle: ui.vibe.code.title,
prompt: ui.vibe.code.prompt,
lines: terminal,
kind: "image",
side: "end",
}}
layout="split"
scale="default"
tone="default"
density="roomy"
/>
<FeatureGrid
id="home-features"
title={ui.site.home.featuresTitle}
features={features}
action={{ label: ui.site.home.featuresAction, href: "#/" }}
layout="grid"
cols="1-3"
item="card"
mediaSide="end"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.features, ui.blocks.variants.features.grid))}
/>
<FeatureSplit
id="home-featuresplit"
title={ui.marketing.featureSplit.title}
lead={ui.marketing.featureSplit.lead}
badge={ui.marketing.featureSplit.badge}
features={features}
stats={stats}
actions={{
mode: "two",
cta: ui.marketing.featureSplit.cta,
href: "#/start",
secondary: ui.marketing.featureSplit.secondary,
secondaryHref: "#/work",
}}
layout="metrics"
mediaSide="end"
tone="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featuresplit, ui.blocks.variants.featuresplit.metricCards))}
/>
<FeatureShowcase
id="home-featureshowcase"
title={ui.marketing.featureShowcase.title}
lead={ui.marketing.featureShowcase.lead}
features={features}
more={ui.marketing.featureShowcase.more}
item="panel"
cols="4"
tone="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featureshowcase, ui.blocks.variants.featureshowcase.panelCards4))}
/>
<BentoGrid
id="home-bento"
title={ui.vibe.bento.title}
tiles={bento}
layout="bento"
media="image"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.bento, ui.blocks.variants.bento.images))}
/>
<FeatureTabs
id="home-featuretabs"
title={ui.vibe.tabs.title}
features={features}
tabsLabel={ui.vibe.tabs.label}
active="feature-clear"
panel="split"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featuretabs, ui.blocks.variants.featuretabs.split))}
/>
<FeatureAccordion
id="home-accordion"
title={ui.vibe.accordion.title}
features={features}
expand="first"
media="image"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.accordion, ui.blocks.variants.accordion.media))}
/>
</>
);
}
Point the CLI at this runtime once, then add the blocks:
npx ui8kit init --yes --framework vue --dir src --registry-url https://registry.buildy.tw/vue --strict-cdnnpx ui8kit add nav-bar hero-classic feature-grid feature-split feature-showcase bento-grid feature-tabs feature-accordion sitemap-footer<!-- Code generated by xgen. DO NOT EDIT. -->
<!-- Source: xgen/specs/screens/theme-marketing-product.json -->
<!-- The home page of ThemeMarketingProductScreen. -->
<script setup lang="ts">
import {
BentoGrid,
FeatureAccordion,
FeatureGrid,
FeatureShowcase,
FeatureSplit,
FeatureTabs,
HeroClassic,
tpl,
uniqLabel,
type CodeLine,
type Feature,
type Stat,
type Tile,
} from "@ui8kit/vue-ui";
import { fromCodex } from "@ui8kit/app-shared/runtime/core";
import { ui } from "@ui8kit/app-shared/content";
import { terminal as terminalEntries } from "@ui8kit/app-shared/data/terminal";
import { features as featuresEntries } from "@ui8kit/app-shared/data/features";
import { stats as statsEntries } from "@ui8kit/app-shared/data/stats";
import { bento as bentoEntries } from "@ui8kit/app-shared/data/bento";
const TERMINAL_FIELDS = {"id":"id","text":"title.en","kind":"metadata.kind.value"} as const;
const FEATURES_FIELDS = {"id":"id","title":"title.en","text":"metadata.text.value","icon":"metadata.icon.value"} as const;
const STATS_FIELDS = {"id":"id","label":"title.en","value":"metadata.value.value","icon":"metadata.icon.value","hint":"metadata.hint.value"} as const;
const BENTO_FIELDS = {"id":"id","title":"title.en","text":"metadata.text.value","icon":"metadata.icon.value","size":"metadata.size.value"} as const;
const terminal = fromCodex<CodeLine>(terminalEntries, TERMINAL_FIELDS);
const features = fromCodex<Feature>(featuresEntries, FEATURES_FIELDS);
const stats = fromCodex<Stat>(statsEntries, STATS_FIELDS);
const bento = fromCodex<Tile>(bentoEntries, BENTO_FIELDS);
</script>
<template>
<HeroClassic
id="home-hero"
:title="ui.pages.marketingProduct.home.title"
:text="ui.pages.marketingProduct.home.text"
:actions="{
cta: ui.pages.marketingProduct.home.cta,
href: '#/tour',
secondary: ui.site.home.secondary,
secondaryHref: '#/pricing',
emailLabel: ui.promo.newsletter.label,
mode: 'one',
}"
:media="{
codeTitle: ui.vibe.code.title,
prompt: ui.vibe.code.prompt,
lines: terminal,
kind: 'image',
side: 'end',
}"
layout="split"
scale="default"
tone="default"
density="roomy"
/>
<FeatureGrid
id="home-features"
:title="ui.site.home.featuresTitle"
:features="features"
:action="{ label: ui.site.home.featuresAction, href: '#/' }"
layout="grid"
cols="1-3"
item="card"
mediaSide="end"
tone="default"
density="default"
:landmarkLabel="uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.features, ui.blocks.variants.features.grid))"
/>
<FeatureSplit
id="home-featuresplit"
:title="ui.marketing.featureSplit.title"
:lead="ui.marketing.featureSplit.lead"
:badge="ui.marketing.featureSplit.badge"
:features="features"
:stats="stats"
:actions="{
mode: 'two',
cta: ui.marketing.featureSplit.cta,
href: '#/start',
secondary: ui.marketing.featureSplit.secondary,
secondaryHref: '#/work',
}"
layout="metrics"
mediaSide="end"
tone="default"
:landmarkLabel="uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featuresplit, ui.blocks.variants.featuresplit.metricCards))"
/>
<FeatureShowcase
id="home-featureshowcase"
:title="ui.marketing.featureShowcase.title"
:lead="ui.marketing.featureShowcase.lead"
:features="features"
:more="ui.marketing.featureShowcase.more"
item="panel"
cols="4"
tone="default"
:landmarkLabel="uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featureshowcase, ui.blocks.variants.featureshowcase.panelCards4))"
/>
<BentoGrid
id="home-bento"
:title="ui.vibe.bento.title"
:tiles="bento"
layout="bento"
media="image"
tone="default"
density="default"
:landmarkLabel="uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.bento, ui.blocks.variants.bento.images))"
/>
<FeatureTabs
id="home-featuretabs"
:title="ui.vibe.tabs.title"
:features="features"
:tabsLabel="ui.vibe.tabs.label"
active="feature-clear"
panel="split"
tone="default"
density="default"
:landmarkLabel="uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featuretabs, ui.blocks.variants.featuretabs.split))"
/>
<FeatureAccordion
id="home-accordion"
:title="ui.vibe.accordion.title"
:features="features"
expand="first"
media="image"
tone="default"
density="default"
:landmarkLabel="uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.accordion, ui.blocks.variants.accordion.media))"
/>
</template>
Point the CLI at this runtime once, then add the blocks:
npx ui8kit init --yes --framework solid --dir src --registry-url https://registry.buildy.tw/solid --strict-cdnnpx ui8kit add nav-bar hero-classic feature-grid feature-split feature-showcase bento-grid feature-tabs feature-accordion sitemap-footer// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/screens/theme-marketing-product.json
// The home page of ThemeMarketingProductScreen.
import {
BentoGrid,
FeatureAccordion,
FeatureGrid,
FeatureShowcase,
FeatureSplit,
FeatureTabs,
HeroClassic,
tpl,
uniqLabel,
type CodeLine,
type Feature,
type Stat,
type Tile,
} from "@ui8kit/solid-ui";
import { fromCodex } from "@ui8kit/app-shared/runtime/core";
import { ui } from "@ui8kit/app-shared/content";
import { terminal as terminalEntries } from "@ui8kit/app-shared/data/terminal";
import { features as featuresEntries } from "@ui8kit/app-shared/data/features";
import { stats as statsEntries } from "@ui8kit/app-shared/data/stats";
import { bento as bentoEntries } from "@ui8kit/app-shared/data/bento";
const TERMINAL_FIELDS = {"id":"id","text":"title.en","kind":"metadata.kind.value"} as const;
const FEATURES_FIELDS = {"id":"id","title":"title.en","text":"metadata.text.value","icon":"metadata.icon.value"} as const;
const STATS_FIELDS = {"id":"id","label":"title.en","value":"metadata.value.value","icon":"metadata.icon.value","hint":"metadata.hint.value"} as const;
const BENTO_FIELDS = {"id":"id","title":"title.en","text":"metadata.text.value","icon":"metadata.icon.value","size":"metadata.size.value"} as const;
const terminal = fromCodex<CodeLine>(terminalEntries, TERMINAL_FIELDS);
const features = fromCodex<Feature>(featuresEntries, FEATURES_FIELDS);
const stats = fromCodex<Stat>(statsEntries, STATS_FIELDS);
const bento = fromCodex<Tile>(bentoEntries, BENTO_FIELDS);
export function HomePage() {
return (
<>
<HeroClassic
id="home-hero"
title={ui.pages.marketingProduct.home.title}
text={ui.pages.marketingProduct.home.text}
actions={{
cta: ui.pages.marketingProduct.home.cta,
href: "#/tour",
secondary: ui.site.home.secondary,
secondaryHref: "#/pricing",
emailLabel: ui.promo.newsletter.label,
mode: "one",
}}
media={{
codeTitle: ui.vibe.code.title,
prompt: ui.vibe.code.prompt,
lines: terminal,
kind: "image",
side: "end",
}}
layout="split"
scale="default"
tone="default"
density="roomy"
/>
<FeatureGrid
id="home-features"
title={ui.site.home.featuresTitle}
features={features}
action={{ label: ui.site.home.featuresAction, href: "#/" }}
layout="grid"
cols="1-3"
item="card"
mediaSide="end"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.features, ui.blocks.variants.features.grid))}
/>
<FeatureSplit
id="home-featuresplit"
title={ui.marketing.featureSplit.title}
lead={ui.marketing.featureSplit.lead}
badge={ui.marketing.featureSplit.badge}
features={features}
stats={stats}
actions={{
mode: "two",
cta: ui.marketing.featureSplit.cta,
href: "#/start",
secondary: ui.marketing.featureSplit.secondary,
secondaryHref: "#/work",
}}
layout="metrics"
mediaSide="end"
tone="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featuresplit, ui.blocks.variants.featuresplit.metricCards))}
/>
<FeatureShowcase
id="home-featureshowcase"
title={ui.marketing.featureShowcase.title}
lead={ui.marketing.featureShowcase.lead}
features={features}
more={ui.marketing.featureShowcase.more}
item="panel"
cols="4"
tone="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featureshowcase, ui.blocks.variants.featureshowcase.panelCards4))}
/>
<BentoGrid
id="home-bento"
title={ui.vibe.bento.title}
tiles={bento}
layout="bento"
media="image"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.bento, ui.blocks.variants.bento.images))}
/>
<FeatureTabs
id="home-featuretabs"
title={ui.vibe.tabs.title}
features={features}
tabsLabel={ui.vibe.tabs.label}
active="feature-clear"
panel="split"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.featuretabs, ui.blocks.variants.featuretabs.split))}
/>
<FeatureAccordion
id="home-accordion"
title={ui.vibe.accordion.title}
features={features}
expand="first"
media="image"
tone="default"
density="default"
landmarkLabel={uniqLabel(tpl(ui.blocks.landmark, ui.blocks.names.accordion, ui.blocks.variants.accordion.media))}
/>
</>
);
}
Go templ is not installed by the CLI. Copy the files below into your Go module, together with these helper files from packages/templ/ui of the source (package utils):
- utils/cn_merge.go
- utils/dyn.go
- utils/expr.go
- utils/heading.go
- utils/tags.go
- utils/utils.go
- utils/variants_json.go
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/nav-bar.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/block"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/box"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/container"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/grid"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/group"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/link"
linkplain "github.com/codegen-x/ui8kit/packages/templ/ui/ui/link-plain"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// NavBarProps are the props of NavBar; the values are the JSON shapes of the TypeScript props.
type NavBarProps struct {
Label any `json:"label"`
Brand any `json:"brand"`
Links any `json:"links"`
Current any `json:"current"`
Actions any `json:"actions"`
Search any `json:"search"`
Tone any `json:"tone"`
Layout any `json:"layout"`
Over any `json:"over"`
Skip any `json:"skip"`
LandmarkLabel any `json:"landmarkLabel"`
}
// A top bar in four shapes. Axes: layout (inline: brand left, links, button right; split: the brand in the middle with the links on both sides; search: a search field with its shortcut in the middle), over (none, media: the bar sits over a picture, transparent), actions mode (none, cta), tone (default, inverse: on a dark hero band). Turning solid on scroll is a port contract.
templ NavBar(p NavBarProps) {
{{ vLabel := p.Label }}
{{ vBrand := p.Brand }}
{{ vLinks := p.Links }}
{{ vCurrent := uiutils.Def(p.Current, "") }}
{{ vActions := p.Actions }}
{{ vSearch := p.Search }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vLayout := uiutils.Def(p.Layout, "inline") }}
{{ vOver := uiutils.Def(p.Over, "none") }}
{{ vSkip := p.Skip }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@block.Block(block.BlockProps{Tag: "header", Class: uiutils.S(uiutils.Cnv("relative", uiutils.Cond(uiutils.T(uiutils.Eq(vTone, "inverse")), "border-b border-transparent bg-foreground text-background [&_a]:text-background [&_button]:text-background", "border-b border-border bg-background"), uiutils.Cond(uiutils.T(uiutils.Eq(vOver, "media")), "isolate overflow-hidden border-0 bg-transparent", ""))), Attrs: uiutils.Attrs("data-testid", "nav-bar", "data-layout", vLayout, "data-tone", vTone, "aria-label", vLandmarkLabel)}) {
@OverMedia(OverMediaProps{On: uiutils.Eq(vOver, "media"), Alt: vBrand})
if uiutils.T(vSkip) {
@linkplain.LinkPlain(linkplain.LinkPlainProps{Href: "#main-content", Class: "sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:inset-ring focus:inset-ring-border", Attrs: uiutils.Attrs("data-testid", "skip-link")}) {
{ uiutils.Text(vSkip) }
}
}
@container.Container(container.ContainerProps{Class: "mx-auto w-full max-w-6xl px-4", Attrs: uiutils.Attrs("data-slot", "container")}) {
@box.Box(box.BoxProps{Class: uiutils.S(uiutils.Cnv("flex flex-wrap items-center justify-between gap-4", "py-4"))}) {
if uiutils.Eq(vLayout, "split") {
@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl("{0}, {1}", vLabel, vLandmarkLabel)), vLabel), Class: uiutils.Cnv("w-full"), Testid: "site-nav"}) {
@grid.Grid(grid.GridProps{Cols: "1-3", Class: "w-full items-center gap-4"}) {
@box.Box(box.BoxProps{Class: "md:justify-self-start"}) {
@NavLinks(NavLinksProps{Links: vLinks, Current: vCurrent, Side: "left"})
}
@box.Box(box.BoxProps{Class: "text-center"}) {
@link.Link(link.LinkProps{Href: "#/", Variant: "default", Class: "text-lg font-medium", Attrs: uiutils.Attrs("data-testid", "brand")}) {
{ uiutils.Text(vBrand) }
}
}
@group.Group(group.GroupProps{Gap: "4", Align: "center", Justify: "end", Class: "flex-wrap md:justify-self-end"}) {
@box.Box(box.BoxProps{}) {
@NavLinks(NavLinksProps{Links: vLinks, Current: vCurrent, Side: "right"})
}
@NavActions(NavActionsProps{Login: uiutils.Get(vActions, "login"), LoginHref: uiutils.Get(vActions, "loginHref"), Cta: uiutils.Get(vActions, "cta"), CtaHref: uiutils.Get(vActions, "href"), Actions: uiutils.Get(vActions, "mode"), Tone: vTone, ThemeLabel: uiutils.Get(vActions, "themeLabel")})
}
}
}
} else {
@link.Link(link.LinkProps{Href: "#/", Variant: "default", Class: "text-lg font-medium", Attrs: uiutils.Attrs("data-testid", "brand")}) {
{ uiutils.Text(vBrand) }
}
if uiutils.Eq(vLayout, "search") {
@SearchPalette(SearchPaletteProps{Label: uiutils.Get(vSearch, "label"), Shortcut: uiutils.Get(vSearch, "shortcut")})
}
@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl("{0}, {1}", vLabel, vLandmarkLabel)), vLabel), Class: uiutils.Cnv("order-last w-full overflow-x-auto md:order-none md:w-auto [&>div]:flex-nowrap md:[&>div]:flex-wrap [&_a]:shrink-0"), Testid: "site-nav"}) {
@NavLinks(NavLinksProps{Links: vLinks, Current: vCurrent})
}
@NavActions(NavActionsProps{Login: uiutils.Get(vActions, "login"), LoginHref: uiutils.Get(vActions, "loginHref"), Cta: uiutils.Get(vActions, "cta"), CtaHref: uiutils.Get(vActions, "href"), Actions: uiutils.Get(vActions, "mode"), Tone: vTone, ThemeLabel: uiutils.Get(vActions, "themeLabel")})
}
}
}
}
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/hero-classic.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/box"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/button"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/grid"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/group"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/input"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/label"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// HeroClassicProps are the props of HeroClassic; the values are the JSON shapes of the TypeScript props.
type HeroClassicProps struct {
Id any `json:"id"`
Title any `json:"title"`
Text any `json:"text"`
Level any `json:"level"`
Badge any `json:"badge"`
Topics any `json:"topics"`
Actions any `json:"actions"`
Media any `json:"media"`
Layout any `json:"layout"`
Scale any `json:"scale"`
Tone any `json:"tone"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// The top of a page: heading, lead and actions, with optional media (image, backdrop, code window, cluster). Axes: layout, media kind and side, scale, tone, density, actions mode.
templ HeroClassic(p HeroClassicProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vText := p.Text }}
{{ vLevel := uiutils.Def(p.Level, float64(1)) }}
{{ vBadge := p.Badge }}
{{ vTopics := p.Topics }}
{{ vActions := p.Actions }}
{{ vMedia := p.Media }}
{{ vLayout := uiutils.Def(p.Layout, "centered") }}
{{ vScale := uiutils.Def(p.Scale, "default") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vDensity := uiutils.Def(p.Density, "roomy") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
{{ vMediaKind := any(uiutils.Coalesce(uiutils.Get(vMedia, "kind"), "none")) }}
{{ vMediaSide := any(uiutils.Coalesce(uiutils.Get(vMedia, "side"), "end")) }}
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vText, Heading: map[string]any{"level": vLevel, "scale": vScale, "badge": vBadge}, Layout: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "split")), "split", "stack"), Align: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "split")), "start", "center"), Media: map[string]any{"show": uiutils.Or(uiutils.Eq(vMediaKind, "image"), uiutils.Eq(vMediaKind, "code"), uiutils.Eq(vMediaKind, "cluster")), "side": vMediaSide}, Tone: vTone, Density: vDensity, Class: uiutils.Cnv(uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Cond(uiutils.T(uiutils.Eq(vMediaKind, "backdrop")), "image", "none"), "image")), "relative isolate overflow-hidden", "")), LandmarkLabel: vLandmarkLabel, Aside: heroClassicFill1(p, vTitle, vMedia, vMediaKind)}) {
@Backdrop(BackdropProps{Kind: uiutils.Cond(uiutils.T(uiutils.Eq(vMediaKind, "backdrop")), "image", "none"), Alt: vTitle})
if uiutils.T(uiutils.Get(vActions, "cta")) {
if uiutils.Eq(uiutils.Get(vActions, "mode"), "form") {
@box.Box(box.BoxProps{Class: uiutils.S(uiutils.Cnv("w-full max-w-xl", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "centered")), "mx-auto", ""))), Attrs: uiutils.Attrs("data-testid", "email-form")}) {
@label.Label(label.LabelProps{HTMLFor: uiutils.S(uiutils.Tpl("{0}-email", vId)), Class: "sr-only"}) {
{ uiutils.Text(uiutils.Get(vActions, "emailLabel")) }
}
@group.Group(group.GroupProps{Gap: "2", Align: "start", Class: "w-full flex-wrap"}) {
@input.Input(input.InputProps{Type: "text", Name: "prompt", Class: "min-w-0 flex-1", Placeholder: uiutils.S(uiutils.Get(vActions, "emailLabel")), Attrs: uiutils.Attrs("id", uiutils.Tpl("{0}-email", vId), "data-testid", "field")})
@button.Button(button.ButtonProps{Variant: "default", Size: "default", Href: uiutils.S(uiutils.Coalesce(uiutils.Get(vActions, "href"), "#/")), Attrs: uiutils.Attrs("data-testid", "submit")}) {
{ uiutils.Text(uiutils.Get(vActions, "cta")) }
}
}
}
} else {
@ActionGroup(ActionGroupProps{Primary: uiutils.Get(vActions, "cta"), PrimaryHref: uiutils.Get(vActions, "href"), Secondary: uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vActions, "mode"), "two")), uiutils.Get(vActions, "secondary"), nil), SecondaryHref: uiutils.Get(vActions, "secondaryHref"), Align: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "centered")), "center", "start")})
}
}
if uiutils.T(vTopics) {
@TopicChips(TopicChipsProps{Topics: vTopics})
}
}
}
templ heroClassicFill1(p HeroClassicProps, vTitle any, vMedia any, vMediaKind any) {
if uiutils.T(uiutils.And(uiutils.Eq(vMediaKind, "code"), uiutils.Get(vMedia, "lines"), uiutils.Get(vMedia, "codeTitle"), uiutils.Get(vMedia, "prompt"))) {
@CodeWindow(CodeWindowProps{Title: uiutils.Get(vMedia, "codeTitle"), Prompt: uiutils.Get(vMedia, "prompt"), Lines: uiutils.Get(vMedia, "lines")})
}
if uiutils.Eq(vMediaKind, "cluster") {
@grid.Grid(grid.GridProps{Cols: "3", Class: "items-end gap-4", Attrs: uiutils.Attrs("data-testid", "cluster")}) {
@box.Box(box.BoxProps{Class: uiutils.S(uiutils.Cnv("w-full", ""))}) {
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "3/4"})
}
@box.Box(box.BoxProps{Class: uiutils.S(uiutils.Cnv("w-full", "-translate-y-4"))}) {
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "4/3"})
}
@box.Box(box.BoxProps{Class: uiutils.S(uiutils.Cnv("w-full", ""))}) {
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "3/4"})
}
}
}
if uiutils.T(uiutils.Or(uiutils.Eq(vMediaKind, "image"))) {
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "4/3"})
}
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/feature-grid.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/group"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/link"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/title"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// FeatureGridProps are the props of FeatureGrid; the values are the JSON shapes of the TypeScript props.
type FeatureGridProps struct {
Id any `json:"id"`
Title any `json:"title"`
Features any `json:"features"`
Action any `json:"action"`
Layout any `json:"layout"`
Cols any `json:"cols"`
Item any `json:"item"`
MediaSide any `json:"mediaSide"`
Tone any `json:"tone"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// A section with a heading and the features as a grid of cards or tiles, or as rows with a picture. Icons are Lucide names. Axes: layout (grid, rows), columns, item (card, tile, cell: bordered tile with a round icon), media side (rows), density, tone.
templ FeatureGrid(p FeatureGridProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vFeatures := p.Features }}
{{ vAction := p.Action }}
{{ vLayout := uiutils.Def(p.Layout, "grid") }}
{{ vCols := uiutils.Def(p.Cols, "1-3") }}
{{ vItem := uiutils.Def(p.Item, "card") }}
{{ vMediaSide := uiutils.Def(p.MediaSide, "end") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vDensity := uiutils.Def(p.Density, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
if uiutils.Eq(vItem, "cell") {
@SectionFrame(SectionFrameProps{Id: vId, Tone: vTone, Density: vDensity, Measure: "fill", Class: uiutils.Cnv("py-0"), LandmarkLabel: vLandmarkLabel}) {
@group.Group(group.GroupProps{Gap: "4", Align: "center", Justify: "between", Class: "w-full"}) {
@title.Title(title.TitleProps{As: uiutils.HeadingLevel(uiutils.I(float64(2))), Size: "sm", Weight: "semibold", Class: "leading-7", Attrs: uiutils.Attrs("id", uiutils.Add(vId, "-title"))}) {
{ uiutils.Text(vTitle) }
}
if uiutils.T(uiutils.Get(vAction, "label")) {
@link.Link(link.LinkProps{Href: uiutils.S(uiutils.Coalesce(uiutils.Get(vAction, "href"), "#/")), Variant: "default", Class: uiutils.S(uiutils.Cnv(uiutils.Get(presetDefaults, "text", "tiny"), "shrink-0 font-medium leading-5")), Attrs: uiutils.Attrs("data-testid", "section-action")}) {
{ uiutils.Text(uiutils.Get(vAction, "label")) }
}
}
}
@FeatureCards(FeatureCardsProps{Features: vFeatures, Cols: vCols, Item: vItem})
}
} else {
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Action: vAction, Tone: vTone, Density: vDensity, LandmarkLabel: vLandmarkLabel}) {
if uiutils.Eq(vLayout, "rows") {
@FeatureRows(FeatureRowsProps{Features: vFeatures, MediaSide: vMediaSide})
} else {
@FeatureCards(FeatureCardsProps{Features: vFeatures, Cols: vCols, Item: vItem})
}
}
}
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/feature-split.json
package blocks
import (
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// FeatureSplitProps are the props of FeatureSplit; the values are the JSON shapes of the TypeScript props.
type FeatureSplitProps struct {
Id any `json:"id"`
Title any `json:"title"`
Lead any `json:"lead"`
Badge any `json:"badge"`
Level any `json:"level"`
Features any `json:"features"`
Stats any `json:"stats"`
Actions any `json:"actions"`
Layout any `json:"layout"`
MediaSide any `json:"mediaSide"`
Tone any `json:"tone"`
LandmarkLabel any `json:"landmarkLabel"`
}
// Features beside a picture. Axes: layout (grid: four plain features in two columns, cards: four features as cards and the actions, stats: two figure cards over three checked rows beside a square picture, metrics: four metric cards and the actions), mediaSide, tone.
templ FeatureSplit(p FeatureSplitProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vLead := uiutils.Def(p.Lead, "") }}
{{ vBadge := uiutils.Def(p.Badge, "") }}
{{ vLevel := uiutils.Def(p.Level, float64(2)) }}
{{ vFeatures := p.Features }}
{{ vStats := p.Stats }}
{{ vActions := p.Actions }}
{{ vLayout := uiutils.Def(p.Layout, "grid") }}
{{ vMediaSide := uiutils.Def(p.MediaSide, "end") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Heading: map[string]any{"badge": vBadge, "level": vLevel}, Tone: vTone, Layout: "split", Media: map[string]any{"show": true, "side": vMediaSide}, LandmarkLabel: vLandmarkLabel, Aside: featureSplitFill1(p, vTitle, vLayout)}) {
if uiutils.Eq(vLayout, "grid") {
@FeaturePairs(FeaturePairsProps{Features: vFeatures})
}
if uiutils.Eq(vLayout, "cards") {
@FeatureCards(FeatureCardsProps{Features: vFeatures, Cols: "1-2", Item: "tile"})
}
if uiutils.Eq(vLayout, "stats") {
@FeatureStatRows(FeatureStatRowsProps{Features: vFeatures, Stats: vStats})
}
if uiutils.Eq(vLayout, "metrics") {
@FeatureMetricCards(FeatureMetricCardsProps{Stats: vStats})
}
if uiutils.T(uiutils.Or(uiutils.Eq(vLayout, "cards"), uiutils.Eq(vLayout, "metrics"))) {
@ActionGroup(ActionGroupProps{Primary: uiutils.Get(vActions, "cta"), PrimaryHref: uiutils.Get(vActions, "href"), Secondary: uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vActions, "mode"), "two")), uiutils.Get(vActions, "secondary"), nil), SecondaryHref: uiutils.Get(vActions, "secondaryHref")})
}
}
}
templ featureSplitFill1(p FeatureSplitProps, vTitle any, vLayout any) {
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "stats")), "1/1", "4/3")})
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/feature-showcase.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/box"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/card"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/link"
lucideicon "github.com/codegen-x/ui8kit/packages/templ/ui/ui/lucide-icon"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/text"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/title"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// FeatureShowcaseProps are the props of FeatureShowcase; the values are the JSON shapes of the TypeScript props.
type FeatureShowcaseProps struct {
Id any `json:"id"`
Title any `json:"title"`
Lead any `json:"lead"`
Features any `json:"features"`
More any `json:"more"`
Item any `json:"item"`
Cols any `json:"cols"`
Tone any `json:"tone"`
LandmarkLabel any `json:"landmarkLabel"`
}
// Features as cards under a centered heading. Axes: item (picture: a picture on top, then the title, the text and a read link; panel: a muted panel with a large glyph on top, then the title and the text), cols (3, 4), tone.
templ FeatureShowcase(p FeatureShowcaseProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vLead := uiutils.Def(p.Lead, "") }}
{{ vFeatures := p.Features }}
{{ vMore := p.More }}
{{ vItem := uiutils.Def(p.Item, "picture") }}
{{ vCols := uiutils.Def(p.Cols, "3") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, Align: "center", LandmarkLabel: vLandmarkLabel}) {
@box.Box(box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vCols, "4")), "grid grid-cols-1 gap-6 text-start sm:grid-cols-2 lg:grid-cols-4", "grid grid-cols-1 gap-6 text-start sm:grid-cols-2 lg:grid-cols-3"))}) {
for _, vF := range uiutils.L(vFeatures) {
@card.Card(card.CardProps{Variant: "default", Class: "h-full gap-4 overflow-hidden", Attrs: uiutils.Attrs("data-testid", "showcase-card")}) {
if uiutils.Eq(vItem, "picture") {
@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vF, "title")})
} else {
@box.Box(box.BoxProps{Class: "flex aspect-video items-center justify-center rounded bg-muted text-foreground", Attrs: uiutils.Attrs("data-testid", "showcase-panel")}) {
@lucideicon.LucideIcon(lucideicon.LucideIconProps{Name: uiutils.S(uiutils.Get(vF, "icon")), Size: 32})
}
}
@card.CardContent(card.CardContentProps{Class: "flex flex-1 flex-col gap-2"}) {
@title.Title(title.TitleProps{As: uiutils.HeadingLevel(uiutils.I(float64(3))), Size: "base", Weight: "semibold"}) {
{ uiutils.Text(uiutils.Get(vF, "title")) }
}
@text.Text(text.TextProps{Size: "sm", Class: "text-muted-foreground"}) {
{ uiutils.Text(uiutils.Get(vF, "text")) }
}
if uiutils.Eq(vItem, "picture") {
@link.Link(link.LinkProps{Href: "#/", Size: "sm", Class: "mt-auto pt-2", Attrs: uiutils.Attrs("data-testid", "read")}) {
{ uiutils.Text(vMore) }
@lucideicon.LucideIcon(lucideicon.LucideIconProps{Name: "arrow-right", Size: 16})
}
}
}
}
}
}
}
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/bento-grid.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/card"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/grid"
lucideicon "github.com/codegen-x/ui8kit/packages/templ/ui/ui/lucide-icon"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/text"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/title"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// BentoGridProps are the props of BentoGrid; the values are the JSON shapes of the TypeScript props.
type BentoGridProps struct {
Id any `json:"id"`
Title any `json:"title"`
Tiles any `json:"tiles"`
Layout any `json:"layout"`
Media any `json:"media"`
Tone any `json:"tone"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
var bentoGridSpan = map[string]any{
"large": "md:col-span-2 md:row-span-2",
"wide": "md:col-span-2",
"small": "",
}
// Tiles of different sizes in one grid: the large and wide tiles hold the important features. Sizes come from the data (large, wide, small). Axes: layout (bento, even: all tiles alike), media (none, image: a picture in the large tiles), tone, density.
templ BentoGrid(p BentoGridProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vTiles := p.Tiles }}
{{ vLayout := uiutils.Def(p.Layout, "bento") }}
{{ vMedia := uiutils.Def(p.Media, "none") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vDensity := uiutils.Def(p.Density, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, Density: vDensity, LandmarkLabel: vLandmarkLabel}) {
@grid.Grid(grid.GridProps{Cols: "1-4", Class: "auto-rows-fr gap-4", Attrs: uiutils.Attrs("data-testid", "items")}) {
for _, vTile := range uiutils.L(vTiles) {
@card.Card(card.CardProps{Variant: "default", Class: uiutils.S(uiutils.Cnv("h-full overflow-hidden", uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, "compact")), "gap-4 p-4", ""), uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "bento")), uiutils.At(bentoGridSpan, uiutils.Get(vTile, "size")), ""))), Attrs: uiutils.Attrs("data-testid", "item", "data-size", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "bento")), uiutils.Get(vTile, "size"), "even"))}) {
@card.CardContent(card.CardContentProps{Class: "flex h-full flex-col gap-4"}) {
@lucideicon.LucideIcon(lucideicon.LucideIconProps{Name: uiutils.S(uiutils.Get(vTile, "icon")), Size: 24})
@title.Title(title.TitleProps{As: uiutils.HeadingLevel(uiutils.I(float64(3))), Size: "xl", Weight: "bold"}) {
{ uiutils.Text(uiutils.Get(vTile, "title")) }
}
@text.Text(text.TextProps{Size: "sm", Class: "text-muted-foreground"}) {
{ uiutils.Text(uiutils.Get(vTile, "text")) }
}
if uiutils.T(uiutils.And(uiutils.Eq(vMedia, "image"), uiutils.Or(uiutils.Eq(uiutils.Get(vTile, "size"), "large"), uiutils.Eq(vLayout, "even")))) {
@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vTile, "title"), Ratio: "4/3", Class: uiutils.Cnv("mt-auto")})
}
}
}
}
}
}
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/feature-tabs.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/grid"
lucideicon "github.com/codegen-x/ui8kit/packages/templ/ui/ui/lucide-icon"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/stack"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/text"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/title"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// FeatureTabsProps are the props of FeatureTabs; the values are the JSON shapes of the TypeScript props.
type FeatureTabsProps struct {
Id any `json:"id"`
Title any `json:"title"`
Features any `json:"features"`
TabsLabel any `json:"tabsLabel"`
Active any `json:"active"`
Panel any `json:"panel"`
Tone any `json:"tone"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// Features behind a tab list: the chosen tab shows its text and a picture. The page keeps the chosen tab (`active`, empty for the first) and updates it on the `select` event. Axes: panel (split: text beside the picture, stack: picture below), tone, density.
templ FeatureTabs(p FeatureTabsProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vFeatures := p.Features }}
{{ vTabsLabel := p.TabsLabel }}
{{ vActive := uiutils.Def(p.Active, "") }}
{{ vPanel := uiutils.Def(p.Panel, "split") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vDensity := uiutils.Def(p.Density, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, Density: vDensity, LandmarkLabel: vLandmarkLabel}) {
@stack.Stack(stack.StackProps{Gap: "6", Align: "stretch"}) {
@Switcher(SwitcherProps{Label: vTabsLabel, Class: uiutils.Cnv("w-fit max-w-full flex-wrap")}) {
for vI, vF := range uiutils.L(vFeatures) {
@SwitcherItem(SwitcherItemProps{Active: uiutils.Or(uiutils.Eq(uiutils.Get(vF, "id"), vActive), uiutils.And(uiutils.Eq(vActive, ""), uiutils.Eq(float64(vI), float64(0))))}) {
{ uiutils.Text(uiutils.Get(vF, "title")) }
}
}
}
for vI, vF := range uiutils.L(vFeatures) {
if uiutils.T(uiutils.Or(uiutils.Eq(uiutils.Get(vF, "id"), vActive), uiutils.And(uiutils.Eq(vActive, ""), uiutils.Eq(float64(vI), float64(0))))) {
@grid.Grid(grid.GridProps{Cols: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vPanel, "split")), "1-2", "1")), Class: "items-center gap-8", Attrs: uiutils.Attrs("data-testid", "tab-panel", "role", "tabpanel")}) {
@stack.Stack(stack.StackProps{Gap: "4"}) {
@lucideicon.LucideIcon(lucideicon.LucideIconProps{Name: uiutils.S(uiutils.Get(vF, "icon")), Size: 24})
@title.Title(title.TitleProps{As: uiutils.HeadingLevel(uiutils.I(float64(3))), Size: "2xl", Weight: "bold"}) {
{ uiutils.Text(uiutils.Get(vF, "title")) }
}
@text.Text(text.TextProps{Size: "base", Class: "text-muted-foreground"}) {
{ uiutils.Text(uiutils.Get(vF, "text")) }
}
}
@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vF, "title"), Ratio: "4/3"})
}
}
}
}
}
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/feature-accordion.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/disclosure"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/inline"
lucideicon "github.com/codegen-x/ui8kit/packages/templ/ui/ui/lucide-icon"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/stack"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/text"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// FeatureAccordionProps are the props of FeatureAccordion; the values are the JSON shapes of the TypeScript props.
type FeatureAccordionProps struct {
Id any `json:"id"`
Title any `json:"title"`
Features any `json:"features"`
Expand any `json:"expand"`
Media any `json:"media"`
Multiple any `json:"multiple"`
Tone any `json:"tone"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// Features as a list of disclosures: icon and title in the summary, the text when open. Axes: expand (first: the first one is open, none: all closed), media (none, image: a picture beside the list), tone, density.
templ FeatureAccordion(p FeatureAccordionProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vFeatures := p.Features }}
{{ vExpand := uiutils.Def(p.Expand, "first") }}
{{ vMedia := uiutils.Def(p.Media, "none") }}
{{ vMultiple := uiutils.Def(p.Multiple, false) }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vDensity := uiutils.Def(p.Density, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, Density: vDensity, Layout: uiutils.Cond(uiutils.T(uiutils.Eq(vMedia, "image")), "split", "stack"), Media: map[string]any{"show": uiutils.Eq(vMedia, "image")}, LandmarkLabel: vLandmarkLabel, Aside: featureAccordionFill1(p, vTitle)}) {
@stack.Stack(stack.StackProps{Gap: "0", Align: "stretch", Attrs: uiutils.Attrs("data-testid", "items")}) {
for vI, vF := range uiutils.L(vFeatures) {
@disclosure.Disclosure(disclosure.DisclosureProps{Variant: "item", Name: uiutils.S(uiutils.Cond(uiutils.T(vMultiple), nil, uiutils.Tpl("{0}-accordion", uiutils.Coalesce(vId, "accordion")))), Open: uiutils.T(uiutils.And(uiutils.Eq(vExpand, "first"), uiutils.Eq(float64(vI), float64(0)))), Attrs: uiutils.Attrs("data-testid", "item")}) {
@disclosure.Summary(disclosure.SummaryProps{Variant: "item"}) {
@inline.Inline(inline.InlineProps{Class: "flex min-w-0 items-center justify-start gap-4"}) {
@lucideicon.LucideIcon(lucideicon.LucideIconProps{Name: uiutils.S(uiutils.Get(vF, "icon")), Size: 20})
@inline.Inline(inline.InlineProps{Class: "text-base font-semibold"}) {
{ uiutils.Text(uiutils.Get(vF, "title")) }
}
}
}
@text.Text(text.TextProps{Size: "sm", Class: "pb-4 text-muted-foreground"}) {
{ uiutils.Text(uiutils.Get(vF, "text")) }
}
}
}
}
}
}
templ featureAccordionFill1(p FeatureAccordionProps, vTitle any) {
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "4/3"})
}
// Code generated by xgen. DO NOT EDIT.
// Source: xgen/specs/organisms/sitemap-footer.json
package blocks
import (
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/block"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/box"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/button"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/container"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/form"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/group"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/input"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/label"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/link"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/stack"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/text"
"github.com/codegen-x/ui8kit/packages/templ/ui/ui/title"
uiutils "github.com/codegen-x/ui8kit/packages/templ/ui/utils"
)
// SitemapFooterProps are the props of SitemapFooter; the values are the JSON shapes of the TypeScript props.
type SitemapFooterProps struct {
Label any `json:"label"`
Brand any `json:"brand"`
Tagline any `json:"tagline"`
Copyright any `json:"copyright"`
Groups any `json:"groups"`
Signup any `json:"signup"`
Status any `json:"status"`
Id any `json:"id"`
Layout any `json:"layout"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// A footer with the brand, a tagline, groups of links and the copyright. Axes: layout (columns: brand above, equal columns per group, row: the brand, the group names and the copyright in one row), signup mode (none, first: a sign-up above the links), status mode (none, show: a live status pill), density. The live status itself is a port contract.
templ SitemapFooter(p SitemapFooterProps) {
{{ vLabel := p.Label }}
{{ vBrand := p.Brand }}
{{ vTagline := p.Tagline }}
{{ vCopyright := p.Copyright }}
{{ vGroups := p.Groups }}
{{ vSignup := p.Signup }}
{{ vStatus := p.Status }}
{{ vId := uiutils.Def(p.Id, "footer") }}
{{ vLayout := uiutils.Def(p.Layout, "columns") }}
{{ vDensity := uiutils.Def(p.Density, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
if uiutils.Eq(vLayout, "card") {
@FooterCard(FooterCardProps{Label: vLabel, Brand: vBrand, Groups: vGroups, LandmarkLabel: vLandmarkLabel})
} else {
@block.Block(block.BlockProps{Tag: "footer", Class: "mt-12 border-t border-border", Attrs: uiutils.Attrs("data-testid", "site-footer", "data-layout", vLayout, "aria-label", vLandmarkLabel)}) {
@container.Container(container.ContainerProps{Class: uiutils.S(uiutils.Cnv("mx-auto w-full max-w-6xl px-4", "flex flex-col gap-8", uiutils.Cond(uiutils.T(uiutils.Eq(vDensity, "compact")), "py-6", "py-12"))), Attrs: uiutils.Attrs("data-slot", "container")}) {
if uiutils.Eq(uiutils.Get(vSignup, "mode"), "first") {
@stack.Stack(stack.StackProps{Gap: "4", Class: "max-w-md", Attrs: uiutils.Attrs("data-testid", "signup")}) {
@title.Title(title.TitleProps{As: uiutils.HeadingLevel(uiutils.I(float64(3))), Size: "xl", Weight: "bold"}) {
{ uiutils.Text(uiutils.Get(vSignup, "title")) }
}
@form.Form(form.FormProps{Method: "dialog", Class: uiutils.S(uiutils.Cnv("w-full max-w-md", uiutils.Cond(uiutils.T(false), "mx-auto", ""))), Attrs: uiutils.Attrs("data-testid", "email-form")}) {
@label.Label(label.LabelProps{HTMLFor: uiutils.S(uiutils.Tpl("{0}-email", vId)), Class: "sr-only"}) {
{ uiutils.Text(uiutils.Get(vSignup, "label")) }
}
@group.Group(group.GroupProps{Gap: "2", Align: "start", Class: "w-full flex-wrap"}) {
@input.Input(input.InputProps{Type: "email", Name: "email", Class: "min-w-0 flex-1", Attrs: uiutils.Attrs("id", uiutils.Tpl("{0}-email", vId), "data-testid", "field")})
@button.Button(button.ButtonProps{Variant: "default", Size: "default", Type: "submit", Attrs: uiutils.Attrs("data-testid", "submit")}) {
{ uiutils.Text(uiutils.Get(vSignup, "submit")) }
}
}
}
}
}
if uiutils.Eq(vLayout, "columns") {
@box.Box(box.BoxProps{Class: "flex flex-col gap-8 md:flex-row md:items-start md:gap-12", Attrs: uiutils.Attrs("data-slot", "footer-top")}) {
@stack.Stack(stack.StackProps{Gap: "2", Class: "md:w-64 md:shrink-0"}) {
@text.Text(text.TextProps{Size: "xl", Weight: "bold"}) {
{ uiutils.Text(vBrand) }
}
@text.Text(text.TextProps{Size: "sm", Class: "text-muted-foreground"}) {
{ uiutils.Text(vTagline) }
}
}
@box.Box(box.BoxProps{Class: "min-w-0 flex-1"}) {
@FooterColumns(FooterColumnsProps{Label: vLabel, Groups: vGroups, LandmarkLabel: vLandmarkLabel})
}
}
} else {
@group.Group(group.GroupProps{Gap: "6", Align: "center", Justify: "between", Class: "flex-wrap"}) {
@text.Text(text.TextProps{Size: "base", Weight: "bold"}) {
{ uiutils.Text(vBrand) }
}
@NavBlock(NavBlockProps{Label: uiutils.Cond(uiutils.T(vLandmarkLabel), uiutils.Uniq(uiutils.Tpl("{0}, {1}", vLabel, vLandmarkLabel)), vLabel)}) {
@group.Group(group.GroupProps{Gap: "4", Class: "flex-wrap"}) {
for _, vG := range uiutils.L(vGroups) {
@link.Link(link.LinkProps{Href: "#/", Variant: "default", Class: "text-sm", Attrs: uiutils.Attrs("data-testid", "group")}) {
{ uiutils.Text(uiutils.Get(vG, "title")) }
}
}
}
}
}
}
@group.Group(group.GroupProps{Gap: "4", Align: "center", Justify: "between", Class: "flex-wrap border-t border-border pt-6"}) {
@text.Text(text.TextProps{Size: "sm", Class: "text-muted-foreground"}) {
{ uiutils.Text(vCopyright) }
}
if uiutils.Eq(uiutils.Get(vStatus, "mode"), "show") {
@Pill(PillProps{Tone: "green", Icon: "circle-check"}) {
{ uiutils.Text(uiutils.Get(vStatus, "label")) }
}
}
}
}
}
}
}
Twig is not installed by the CLI. Copy the template files below into your Twig templates, together with these helper files from packages/twig/ui of the source (the Runtime, CnMerge and the Twig extension):
- php/CnMerge.php
- php/Extension.php
- php/Runtime.php
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/nav-bar.json
A top bar in four shapes. Axes: layout (inline: brand left, links, button right; split: the brand in the middle with the links on both sides; search: a search field with its shortcut in the middle), over (none, media: the bar sits over a picture, transparent), actions mode (none, cta), tone (default, inverse: on a dark hero band). Turning solid on scroll is a port contract.
Props (p): label, brand, links, current, actions, search, tone, layout, over, skip, landmarkLabel. -#}
{%- set v_label = (p.label ?? null) -%}
{%- set v_brand = (p.brand ?? null) -%}
{%- set v_links = (p.links ?? null) -%}
{%- set v_current = (p.current ?? '') -%}
{%- set v_actions = (p.actions ?? null) -%}
{%- set v_search = (p.search ?? null) -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_layout = (p.layout ?? 'inline') -%}
{%- set v_over = (p.over ?? 'none') -%}
{%- set v_skip = (p.skip ?? null) -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_13 -%}
{{ include('blocks/over-media.html.twig', {'p': {'on': ui_eq(v_over, 'media'), 'alt': v_brand}}, with_context = false) }}
{%- if ui_t(v_skip) %}
{%- set c_1 -%}
{{ ui_text(v_skip) }}
{%- endset -%}
{{ include('ui/link-plain/link-plain.html.twig', {'p': {'Href': '#main-content', 'Class': 'sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:inset-ring focus:inset-ring-border', 'Attrs': ui_attrs(['data-testid', 'skip-link'])}, 'children': c_1}, with_context = false) }}
{%- endif %}
{%- set c_12 -%}
{%- set c_11 -%}
{%- if ui_t(ui_eq(v_layout, 'split')) %}
{%- set c_8 -%}
{%- set c_7 -%}
{%- set c_2 -%}
{{ include('blocks/nav-links.html.twig', {'p': {'links': v_links, 'current': v_current, 'side': 'left'}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'md:justify-self-start'}, 'children': c_2}, with_context = false) }}
{%- set c_4 -%}
{%- set c_3 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ include('ui/link/link.html.twig', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-lg font-medium', 'Attrs': ui_attrs(['data-testid', 'brand'])}, 'children': c_3}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'text-center'}, 'children': c_4}, with_context = false) }}
{%- set c_6 -%}
{%- set c_5 -%}
{{ include('blocks/nav-links.html.twig', {'p': {'links': v_links, 'current': v_current, 'side': 'right'}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {}, 'children': c_5}, with_context = false) }}
{{ include('blocks/nav-actions.html.twig', {'p': {'login': ui_get(v_actions, ['login']), 'loginHref': ui_get(v_actions, ['loginHref']), 'cta': ui_get(v_actions, ['cta']), 'ctaHref': ui_get(v_actions, ['href']), 'actions': ui_get(v_actions, ['mode']), 'tone': v_tone, 'themeLabel': ui_get(v_actions, ['themeLabel'])}}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'end', 'Class': 'flex-wrap md:justify-self-end'}, 'children': c_6}, with_context = false) }}
{%- endset -%}
{{ include('ui/grid/grid.html.twig', {'p': {'Cols': '1-3', 'Class': 'w-full items-center gap-4'}, 'children': c_7}, with_context = false) }}
{%- endset -%}
{{ include('blocks/nav-block.html.twig', {'p': {'label': (ui_t(v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) : v_label), 'className': ui_cnv(['w-full']), 'testid': 'site-nav'}, 'children': c_8}, with_context = false) }}
{%- else %}
{%- set c_9 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ include('ui/link/link.html.twig', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-lg font-medium', 'Attrs': ui_attrs(['data-testid', 'brand'])}, 'children': c_9}, with_context = false) }}
{%- if ui_t(ui_eq(v_layout, 'search')) %}
{{ include('blocks/search-palette.html.twig', {'p': {'label': ui_get(v_search, ['label']), 'shortcut': ui_get(v_search, ['shortcut'])}}, with_context = false) }}
{%- endif %}
{%- set c_10 -%}
{{ include('blocks/nav-links.html.twig', {'p': {'links': v_links, 'current': v_current}}, with_context = false) }}
{%- endset -%}
{{ include('blocks/nav-block.html.twig', {'p': {'label': (ui_t(v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) : v_label), 'className': ui_cnv(['order-last w-full overflow-x-auto md:order-none md:w-auto [&>div]:flex-nowrap md:[&>div]:flex-wrap [&_a]:shrink-0']), 'testid': 'site-nav'}, 'children': c_10}, with_context = false) }}
{{ include('blocks/nav-actions.html.twig', {'p': {'login': ui_get(v_actions, ['login']), 'loginHref': ui_get(v_actions, ['loginHref']), 'cta': ui_get(v_actions, ['cta']), 'ctaHref': ui_get(v_actions, ['href']), 'actions': ui_get(v_actions, ['mode']), 'tone': v_tone, 'themeLabel': ui_get(v_actions, ['themeLabel'])}}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': ui_s(ui_cnv(['flex flex-wrap items-center justify-between gap-4', 'py-4']))}, 'children': c_11}, with_context = false) }}
{%- endset -%}
{{ include('ui/container/container.html.twig', {'p': {'Class': 'mx-auto w-full max-w-6xl px-4', 'Attrs': ui_attrs(['data-slot', 'container'])}, 'children': c_12}, with_context = false) }}
{%- endset -%}
{{ include('ui/block/block.html.twig', {'p': {'Tag': 'header', 'Class': ui_s(ui_cnv(['relative', (ui_t(ui_eq(v_tone, 'inverse')) ? 'border-b border-transparent bg-foreground text-background [&_a]:text-background [&_button]:text-background' : 'border-b border-border bg-background'), (ui_t(ui_eq(v_over, 'media')) ? 'isolate overflow-hidden border-0 bg-transparent' : '')])), 'Attrs': ui_attrs(['data-testid', 'nav-bar', 'data-layout', v_layout, 'data-tone', v_tone, 'aria-label', v_landmarkLabel])}, 'children': c_13}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/hero-classic.json
The top of a page: heading, lead and actions, with optional media (image, backdrop, code window, cluster). Axes: layout, media kind and side, scale, tone, density, actions mode.
Props (p): id, title, text, level, badge, topics, actions, media, layout, scale, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_text = (p.text ?? null) -%}
{%- set v_level = (p.level ?? 1) -%}
{%- set v_badge = (p.badge ?? null) -%}
{%- set v_topics = (p.topics ?? null) -%}
{%- set v_actions = (p.actions ?? null) -%}
{%- set v_media = (p.media ?? null) -%}
{%- set v_layout = (p.layout ?? 'centered') -%}
{%- set v_scale = (p.scale ?? 'default') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'roomy') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set v_mediaKind = ui_coalesce([ui_get(v_media, ['kind']), 'none']) -%}
{%- set v_mediaSide = ui_coalesce([ui_get(v_media, ['side']), 'end']) -%}
{%- set f_5 -%}
{%- if ui_t(ui_and([ui_eq(v_mediaKind, 'code'), ui_get(v_media, ['lines']), ui_get(v_media, ['codeTitle']), ui_get(v_media, ['prompt'])])) %}
{{ include('blocks/code-window.html.twig', {'p': {'title': ui_get(v_media, ['codeTitle']), 'prompt': ui_get(v_media, ['prompt']), 'lines': ui_get(v_media, ['lines'])}}, with_context = false) }}
{%- endif %}
{%- if ui_t(ui_eq(v_mediaKind, 'cluster')) %}
{%- set c_9 -%}
{%- set c_6 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '3/4'}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': ui_s(ui_cnv(['w-full', '']))}, 'children': c_6}, with_context = false) }}
{%- set c_7 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '4/3'}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': ui_s(ui_cnv(['w-full', '-translate-y-4']))}, 'children': c_7}, with_context = false) }}
{%- set c_8 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '3/4'}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': ui_s(ui_cnv(['w-full', '']))}, 'children': c_8}, with_context = false) }}
{%- endset -%}
{{ include('ui/grid/grid.html.twig', {'p': {'Cols': '3', 'Class': 'items-end gap-4', 'Attrs': ui_attrs(['data-testid', 'cluster'])}, 'children': c_9}, with_context = false) }}
{%- endif %}
{%- if ui_t(ui_or([ui_eq(v_mediaKind, 'image')])) %}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '4/3'}}, with_context = false) }}
{%- endif %}
{%- endset -%}
{%- set c_10 -%}
{{ include('blocks/backdrop.html.twig', {'p': {'kind': (ui_t(ui_eq(v_mediaKind, 'backdrop')) ? 'image' : 'none'), 'alt': v_title}}, with_context = false) }}
{%- if ui_t(ui_get(v_actions, ['cta'])) %}
{%- if ui_t(ui_eq(ui_get(v_actions, ['mode']), 'form')) %}
{%- set c_4 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_actions, ['emailLabel'])) }}
{%- endset -%}
{{ include('ui/label/label.html.twig', {'p': {'HTMLFor': ui_s(ui_tpl('{0}-email', [v_id])), 'Class': 'sr-only'}, 'children': c_1}, with_context = false) }}
{%- set c_3 -%}
{{ include('ui/input/input.html.twig', {'p': {'Type': 'text', 'Name': 'prompt', 'Class': 'min-w-0 flex-1', 'Placeholder': ui_s(ui_get(v_actions, ['emailLabel'])), 'Attrs': ui_attrs(['id', ui_tpl('{0}-email', [v_id]), 'data-testid', 'field'])}}, with_context = false) }}
{%- set c_2 -%}
{{ ui_text(ui_get(v_actions, ['cta'])) }}
{%- endset -%}
{{ include('ui/button/button.html.twig', {'p': {'Variant': 'default', 'Size': 'default', 'Href': ui_s(ui_coalesce([ui_get(v_actions, ['href']), '#/'])), 'Attrs': ui_attrs(['data-testid', 'submit'])}, 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '2', 'Align': 'start', 'Class': 'w-full flex-wrap'}, 'children': c_3}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': ui_s(ui_cnv(['w-full max-w-xl', (ui_t(ui_eq(v_layout, 'centered')) ? 'mx-auto' : '')])), 'Attrs': ui_attrs(['data-testid', 'email-form'])}, 'children': c_4}, with_context = false) }}
{%- else %}
{{ include('blocks/action-group.html.twig', {'p': {'primary': ui_get(v_actions, ['cta']), 'primaryHref': ui_get(v_actions, ['href']), 'secondary': (ui_t(ui_eq(ui_get(v_actions, ['mode']), 'two')) ? ui_get(v_actions, ['secondary']) : null), 'secondaryHref': ui_get(v_actions, ['secondaryHref']), 'align': (ui_t(ui_eq(v_layout, 'centered')) ? 'center' : 'start')}}, with_context = false) }}
{%- endif %}
{%- endif %}
{%- if ui_t(v_topics) %}
{{ include('blocks/topic-chips.html.twig', {'p': {'topics': v_topics}}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_text, 'heading': {'level': v_level, 'scale': v_scale, 'badge': v_badge}, 'layout': (ui_t(ui_eq(v_layout, 'split')) ? 'split' : 'stack'), 'align': (ui_t(ui_eq(v_layout, 'split')) ? 'start' : 'center'), 'media': {'show': ui_or([ui_eq(v_mediaKind, 'image'), ui_eq(v_mediaKind, 'code'), ui_eq(v_mediaKind, 'cluster')]), 'side': v_mediaSide}, 'tone': v_tone, 'density': v_density, 'className': ui_cnv([(ui_t(ui_eq((ui_t(ui_eq(v_mediaKind, 'backdrop')) ? 'image' : 'none'), 'image')) ? 'relative isolate overflow-hidden' : '')]), 'landmarkLabel': v_landmarkLabel, 'aside': f_5}, 'children': c_10}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-grid.json
A section with a heading and the features as a grid of cards or tiles, or as rows with a picture. Icons are Lucide names. Axes: layout (grid, rows), columns, item (card, tile, cell: bordered tile with a round icon), media side (rows), density, tone.
Props (p): id, title, features, action, layout, cols, item, mediaSide, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_features = (p.features ?? null) -%}
{%- set v_action = (p.action ?? null) -%}
{%- set v_layout = (p.layout ?? 'grid') -%}
{%- set v_cols = (p.cols ?? '1-3') -%}
{%- set v_item = (p.item ?? 'card') -%}
{%- set v_mediaSide = (p.mediaSide ?? 'end') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- if ui_t(ui_eq(v_item, 'cell')) %}
{%- set c_4 -%}
{%- set c_3 -%}
{%- set c_1 -%}
{{ ui_text(v_title) }}
{%- endset -%}
{{ include('ui/title/title.html.twig', {'p': {'As': ui_i(2), 'Size': 'sm', 'Weight': 'semibold', 'Class': 'leading-7', 'Attrs': ui_attrs(['id', ui_add(v_id, '-title')])}, 'children': c_1}, with_context = false) }}
{%- if ui_t(ui_get(v_action, ['label'])) %}
{%- set c_2 -%}
{{ ui_text(ui_get(v_action, ['label'])) }}
{%- endset -%}
{{ include('ui/link/link.html.twig', {'p': {'Href': ui_s(ui_coalesce([ui_get(v_action, ['href']), '#/'])), 'Variant': 'default', 'Class': ui_s(ui_cnv([ui_preset('blocks/presets/defaults.json', ['text', 'tiny']), 'shrink-0 font-medium leading-5'])), 'Attrs': ui_attrs(['data-testid', 'section-action'])}, 'children': c_2}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between', 'Class': 'w-full'}, 'children': c_3}, with_context = false) }}
{{ include('blocks/feature-cards.html.twig', {'p': {'features': v_features, 'cols': v_cols, 'item': v_item}}, with_context = false) }}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'tone': v_tone, 'density': v_density, 'measure': 'fill', 'className': ui_cnv(['py-0']), 'landmarkLabel': v_landmarkLabel}, 'children': c_4}, with_context = false) }}
{%- else %}
{%- set c_5 -%}
{%- if ui_t(ui_eq(v_layout, 'rows')) %}
{{ include('blocks/feature-rows.html.twig', {'p': {'features': v_features, 'mediaSide': v_mediaSide}}, with_context = false) }}
{%- else %}
{{ include('blocks/feature-cards.html.twig', {'p': {'features': v_features, 'cols': v_cols, 'item': v_item}}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'action': v_action, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': c_5}, with_context = false) }}
{%- endif %}
{
"//": "Code generated by xgen. DO NOT EDIT.",
"specVersion": 1,
"id": "preset.defaults",
"name": "defaults",
"docs": "Default layout preset: the sizes of the landing blocks as Tailwind classes.\nBlocks combine these with token classes; swap the preset to resize every block at once.",
"source": "ui8kit default sizes (Tailwind scale, no arbitrary values)",
"notes": {
"text": "small type steps for chips, badges and links",
"hero.band": "the inverse band: tall section, large bottom radius",
"hero.title": "display title",
"hero.titleWeights": "one font-weight class per title word",
"hero.composer": "the prompt box",
"logos.row": "one centered row of logo slots",
"logos.glyph": "the Lucide glyph inside a slot: half the slot"
},
"values": {
"text": {
"tiny": "text-xs",
"small": "text-sm"
},
"hero": {
"band": "min-h-160 rounded",
"container": "max-w-7xl",
"head": "gap-12",
"badge": "w-48",
"title": "text-5xl leading-tight",
"titleWeights": [
"font-normal",
"font-semibold",
"font-normal",
"font-semibold"
],
"column": "max-w-xl gap-16",
"composer": "h-40 max-w-xl rounded",
"attach": "w-24",
"promptLine": "h-10",
"model": "w-24"
},
"section": {
"landing": "max-w-6xl"
},
"media": {
"rounded": "rounded"
},
"templates": {
"card": "h-60 w-64",
"image": "h-40 w-58 rounded",
"footer": "h-12 min-h-12"
},
"stats": {
"column": "min-h-28",
"figure": "h-12 text-4xl leading-12 md:h-18 md:text-6xl md:leading-18",
"panel": "gap-24 rounded py-20"
},
"features": {
"cells": "rounded"
},
"news": {
"card": "h-56 w-64",
"cover": "h-40 w-64 rounded",
"title": "top-16",
"strip": "h-12 min-h-12"
},
"cta": {
"panel": "rounded py-20",
"title": "max-w-md",
"text": "max-w-2xl",
"button": "w-40"
},
"logos": {
"row": "h-28 max-w-4xl gap-12 pb-8",
"slot": "size-20",
"glyph": 40
},
"footer": {
"card": "h-72 gap-12 rounded",
"brand": "w-48",
"groups": "gap-x-16"
}
}
}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-split.json
Features beside a picture. Axes: layout (grid: four plain features in two columns, cards: four features as cards and the actions, stats: two figure cards over three checked rows beside a square picture, metrics: four metric cards and the actions), mediaSide, tone.
Props (p): id, title, lead, badge, level, features, stats, actions, layout, mediaSide, tone, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_lead = (p.lead ?? '') -%}
{%- set v_badge = (p.badge ?? '') -%}
{%- set v_level = (p.level ?? 2) -%}
{%- set v_features = (p.features ?? null) -%}
{%- set v_stats = (p.stats ?? null) -%}
{%- set v_actions = (p.actions ?? null) -%}
{%- set v_layout = (p.layout ?? 'grid') -%}
{%- set v_mediaSide = (p.mediaSide ?? 'end') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set f_1 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': (ui_t(ui_eq(v_layout, 'stats')) ? '1/1' : '4/3')}}, with_context = false) }}
{%- endset -%}
{%- set c_2 -%}
{%- if ui_t(ui_eq(v_layout, 'grid')) %}
{{ include('blocks/feature-pairs.html.twig', {'p': {'features': v_features}}, with_context = false) }}
{%- endif %}
{%- if ui_t(ui_eq(v_layout, 'cards')) %}
{{ include('blocks/feature-cards.html.twig', {'p': {'features': v_features, 'cols': '1-2', 'item': 'tile'}}, with_context = false) }}
{%- endif %}
{%- if ui_t(ui_eq(v_layout, 'stats')) %}
{{ include('blocks/feature-stat-rows.html.twig', {'p': {'features': v_features, 'stats': v_stats}}, with_context = false) }}
{%- endif %}
{%- if ui_t(ui_eq(v_layout, 'metrics')) %}
{{ include('blocks/feature-metric-cards.html.twig', {'p': {'stats': v_stats}}, with_context = false) }}
{%- endif %}
{%- if ui_t(ui_or([ui_eq(v_layout, 'cards'), ui_eq(v_layout, 'metrics')])) %}
{{ include('blocks/action-group.html.twig', {'p': {'primary': ui_get(v_actions, ['cta']), 'primaryHref': ui_get(v_actions, ['href']), 'secondary': (ui_t(ui_eq(ui_get(v_actions, ['mode']), 'two')) ? ui_get(v_actions, ['secondary']) : null), 'secondaryHref': ui_get(v_actions, ['secondaryHref'])}}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge, 'level': v_level}, 'tone': v_tone, 'layout': 'split', 'media': {'show': true, 'side': v_mediaSide}, 'landmarkLabel': v_landmarkLabel, 'aside': f_1}, 'children': c_2}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-showcase.json
Features as cards under a centered heading. Axes: item (picture: a picture on top, then the title, the text and a read link; panel: a muted panel with a large glyph on top, then the title and the text), cols (3, 4), tone.
Props (p): id, title, lead, features, more, item, cols, tone, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_lead = (p.lead ?? '') -%}
{%- set v_features = (p.features ?? null) -%}
{%- set v_more = (p.more ?? null) -%}
{%- set v_item = (p.item ?? 'picture') -%}
{%- set v_cols = (p.cols ?? '3') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_8 -%}
{%- set c_7 -%}
{%- for v_f in ui_l(v_features) %}
{%- set c_6 -%}
{%- if ui_t(ui_eq(v_item, 'picture')) %}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': ui_get(v_f, ['title'])}}, with_context = false) }}
{%- else %}
{%- set c_1 -%}
{{ include('ui/lucide-icon/lucide-icon.html.twig', {'p': {'Name': ui_s(ui_get(v_f, ['icon'])), 'Size': 32}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'flex aspect-video items-center justify-center rounded bg-muted text-foreground', 'Attrs': ui_attrs(['data-testid', 'showcase-panel'])}, 'children': c_1}, with_context = false) }}
{%- endif %}
{%- set c_5 -%}
{%- set c_2 -%}
{{ ui_text(ui_get(v_f, ['title'])) }}
{%- endset -%}
{{ include('ui/title/title.html.twig', {'p': {'As': ui_i(3), 'Size': 'base', 'Weight': 'semibold'}, 'children': c_2}, with_context = false) }}
{%- set c_3 -%}
{{ ui_text(ui_get(v_f, ['text'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_3}, with_context = false) }}
{%- if ui_t(ui_eq(v_item, 'picture')) %}
{%- set c_4 -%}
{{ ui_text(v_more) }}
{{ include('ui/lucide-icon/lucide-icon.html.twig', {'p': {'Name': 'arrow-right', 'Size': 16}}, with_context = false) }}
{%- endset -%}
{{ include('ui/link/link.html.twig', {'p': {'Href': '#/', 'Size': 'sm', 'Class': 'mt-auto pt-2', 'Attrs': ui_attrs(['data-testid', 'read'])}, 'children': c_4}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('ui/card/card-content.html.twig', {'p': {'Class': 'flex flex-1 flex-col gap-2'}, 'children': c_5}, with_context = false) }}
{%- endset -%}
{{ include('ui/card/card.html.twig', {'p': {'Variant': 'default', 'Class': 'h-full gap-4 overflow-hidden', 'Attrs': ui_attrs(['data-testid', 'showcase-card'])}, 'children': c_6}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': ui_s((ui_t(ui_eq(v_cols, '4')) ? 'grid grid-cols-1 gap-6 text-start sm:grid-cols-2 lg:grid-cols-4' : 'grid grid-cols-1 gap-6 text-start sm:grid-cols-2 lg:grid-cols-3'))}, 'children': c_7}, with_context = false) }}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'align': 'center', 'landmarkLabel': v_landmarkLabel}, 'children': c_8}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/bento-grid.json
Tiles of different sizes in one grid: the large and wide tiles hold the important features. Sizes come from the data (large, wide, small). Axes: layout (bento, even: all tiles alike), media (none, image: a picture in the large tiles), tone, density.
Props (p): id, title, tiles, layout, media, tone, density, landmarkLabel. -#}
{%- set k_SPAN = {'large': 'md:col-span-2 md:row-span-2', 'wide': 'md:col-span-2', 'small': ''} -%}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_tiles = (p.tiles ?? null) -%}
{%- set v_layout = (p.layout ?? 'bento') -%}
{%- set v_media = (p.media ?? 'none') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_6 -%}
{%- set c_5 -%}
{%- for v_tile in ui_l(v_tiles) %}
{%- set c_4 -%}
{%- set c_3 -%}
{{ include('ui/lucide-icon/lucide-icon.html.twig', {'p': {'Name': ui_s(ui_get(v_tile, ['icon'])), 'Size': 24}}, with_context = false) }}
{%- set c_1 -%}
{{ ui_text(ui_get(v_tile, ['title'])) }}
{%- endset -%}
{{ include('ui/title/title.html.twig', {'p': {'As': ui_i(3), 'Size': 'xl', 'Weight': 'bold'}, 'children': c_1}, with_context = false) }}
{%- set c_2 -%}
{{ ui_text(ui_get(v_tile, ['text'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_2}, with_context = false) }}
{%- if ui_t(ui_and([ui_eq(v_media, 'image'), ui_or([ui_eq(ui_get(v_tile, ['size']), 'large'), ui_eq(v_layout, 'even')])])) %}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': ui_get(v_tile, ['title']), 'ratio': '4/3', 'className': ui_cnv(['mt-auto'])}}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('ui/card/card-content.html.twig', {'p': {'Class': 'flex h-full flex-col gap-4'}, 'children': c_3}, with_context = false) }}
{%- endset -%}
{{ include('ui/card/card.html.twig', {'p': {'Variant': 'default', 'Class': ui_s(ui_cnv(['h-full overflow-hidden', (ui_t(ui_eq(v_density, 'compact')) ? 'gap-4 p-4' : ''), (ui_t(ui_eq(v_layout, 'bento')) ? ui_at(k_SPAN, ui_get(v_tile, ['size'])) : '')])), 'Attrs': ui_attrs(['data-testid', 'item', 'data-size', (ui_t(ui_eq(v_layout, 'bento')) ? ui_get(v_tile, ['size']) : 'even')])}, 'children': c_4}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('ui/grid/grid.html.twig', {'p': {'Cols': '1-4', 'Class': 'auto-rows-fr gap-4', 'Attrs': ui_attrs(['data-testid', 'items'])}, 'children': c_5}, with_context = false) }}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': c_6}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-tabs.json
Features behind a tab list: the chosen tab shows its text and a picture. The page keeps the chosen tab (`active`, empty for the first) and updates it on the `select` event. Axes: panel (split: text beside the picture, stack: picture below), tone, density.
Props (p): id, title, features, tabsLabel, active, panel, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_features = (p.features ?? null) -%}
{%- set v_tabsLabel = (p.tabsLabel ?? null) -%}
{%- set v_active = (p.active ?? '') -%}
{%- set v_panel = (p.panel ?? 'split') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_8 -%}
{%- set c_7 -%}
{%- set c_2 -%}
{%- for v_f in ui_l(v_features) %}
{%- set v_i = loop.index0 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_f, ['title'])) }}
{%- endset -%}
{{ include('blocks/switcher-item.html.twig', {'p': {'active': ui_or([ui_eq(ui_get(v_f, ['id']), v_active), ui_and([ui_eq(v_active, ''), ui_eq(v_i, 0)])])}, 'children': c_1}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('blocks/switcher.html.twig', {'p': {'label': v_tabsLabel, 'className': ui_cnv(['w-fit max-w-full flex-wrap'])}, 'children': c_2}, with_context = false) }}
{%- for v_f in ui_l(v_features) %}
{%- set v_i = loop.index0 -%}
{%- if ui_t(ui_or([ui_eq(ui_get(v_f, ['id']), v_active), ui_and([ui_eq(v_active, ''), ui_eq(v_i, 0)])])) %}
{%- set c_6 -%}
{%- set c_5 -%}
{{ include('ui/lucide-icon/lucide-icon.html.twig', {'p': {'Name': ui_s(ui_get(v_f, ['icon'])), 'Size': 24}}, with_context = false) }}
{%- set c_3 -%}
{{ ui_text(ui_get(v_f, ['title'])) }}
{%- endset -%}
{{ include('ui/title/title.html.twig', {'p': {'As': ui_i(3), 'Size': '2xl', 'Weight': 'bold'}, 'children': c_3}, with_context = false) }}
{%- set c_4 -%}
{{ ui_text(ui_get(v_f, ['text'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'base', 'Class': 'text-muted-foreground'}, 'children': c_4}, with_context = false) }}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '4'}, 'children': c_5}, with_context = false) }}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': ui_get(v_f, ['title']), 'ratio': '4/3'}}, with_context = false) }}
{%- endset -%}
{{ include('ui/grid/grid.html.twig', {'p': {'Cols': ui_s((ui_t(ui_eq(v_panel, 'split')) ? '1-2' : '1')), 'Class': 'items-center gap-8', 'Attrs': ui_attrs(['data-testid', 'tab-panel', 'role', 'tabpanel'])}, 'children': c_6}, with_context = false) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '6', 'Align': 'stretch'}, 'children': c_7}, with_context = false) }}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': c_8}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-accordion.json
Features as a list of disclosures: icon and title in the summary, the text when open. Axes: expand (first: the first one is open, none: all closed), media (none, image: a picture beside the list), tone, density.
Props (p): id, title, features, expand, media, multiple, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_features = (p.features ?? null) -%}
{%- set v_expand = (p.expand ?? 'first') -%}
{%- set v_media = (p.media ?? 'none') -%}
{%- set v_multiple = (p.multiple ?? false) -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set f_7 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '4/3'}}, with_context = false) }}
{%- endset -%}
{%- set c_8 -%}
{%- set c_6 -%}
{%- for v_f in ui_l(v_features) %}
{%- set v_i = loop.index0 -%}
{%- set c_5 -%}
{%- set c_3 -%}
{%- set c_2 -%}
{{ include('ui/lucide-icon/lucide-icon.html.twig', {'p': {'Name': ui_s(ui_get(v_f, ['icon'])), 'Size': 20}}, with_context = false) }}
{%- set c_1 -%}
{{ ui_text(ui_get(v_f, ['title'])) }}
{%- endset -%}
{{ include('ui/inline/inline.html.twig', {'p': {'Class': 'text-base font-semibold'}, 'children': c_1}, with_context = false) }}
{%- endset -%}
{{ include('ui/inline/inline.html.twig', {'p': {'Class': 'flex min-w-0 items-center justify-start gap-4'}, 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('ui/disclosure/summary.html.twig', {'p': {'Variant': 'item'}, 'children': c_3}, with_context = false) }}
{%- set c_4 -%}
{{ ui_text(ui_get(v_f, ['text'])) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Class': 'pb-4 text-muted-foreground'}, 'children': c_4}, with_context = false) }}
{%- endset -%}
{{ include('ui/disclosure/disclosure.html.twig', {'p': {'Variant': 'item', 'Name': ui_s((ui_t(v_multiple) ? null : ui_tpl('{0}-accordion', [ui_coalesce([v_id, 'accordion'])]))), 'Open': ui_t(ui_and([ui_eq(v_expand, 'first'), ui_eq(v_i, 0)])), 'Attrs': ui_attrs(['data-testid', 'item'])}, 'children': c_5}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '0', 'Align': 'stretch', 'Attrs': ui_attrs(['data-testid', 'items'])}, 'children': c_6}, with_context = false) }}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'layout': (ui_t(ui_eq(v_media, 'image')) ? 'split' : 'stack'), 'media': {'show': ui_eq(v_media, 'image')}, 'landmarkLabel': v_landmarkLabel, 'aside': f_7}, 'children': c_8}, with_context = false) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/sitemap-footer.json
A footer with the brand, a tagline, groups of links and the copyright. Axes: layout (columns: brand above, equal columns per group, row: the brand, the group names and the copyright in one row), signup mode (none, first: a sign-up above the links), status mode (none, show: a live status pill), density. The live status itself is a port contract.
Props (p): label, brand, tagline, copyright, groups, signup, status, id, layout, density, landmarkLabel. -#}
{%- set v_label = (p.label ?? null) -%}
{%- set v_brand = (p.brand ?? null) -%}
{%- set v_tagline = (p.tagline ?? null) -%}
{%- set v_copyright = (p.copyright ?? null) -%}
{%- set v_groups = (p.groups ?? null) -%}
{%- set v_signup = (p.signup ?? null) -%}
{%- set v_status = (p.status ?? null) -%}
{%- set v_id = (p.id ?? 'footer') -%}
{%- set v_layout = (p.layout ?? 'columns') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- if ui_t(ui_eq(v_layout, 'card')) %}
{{ include('blocks/footer-card.html.twig', {'p': {'label': v_label, 'brand': v_brand, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}, with_context = false) }}
{%- else %}
{%- set c_21 -%}
{%- set c_20 -%}
{%- if ui_t(ui_eq(ui_get(v_signup, ['mode']), 'first')) %}
{%- set c_6 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_signup, ['title'])) }}
{%- endset -%}
{{ include('ui/title/title.html.twig', {'p': {'As': ui_i(3), 'Size': 'xl', 'Weight': 'bold'}, 'children': c_1}, with_context = false) }}
{%- set c_5 -%}
{%- set c_2 -%}
{{ ui_text(ui_get(v_signup, ['label'])) }}
{%- endset -%}
{{ include('ui/label/label.html.twig', {'p': {'HTMLFor': ui_s(ui_tpl('{0}-email', [v_id])), 'Class': 'sr-only'}, 'children': c_2}, with_context = false) }}
{%- set c_4 -%}
{{ include('ui/input/input.html.twig', {'p': {'Type': 'email', 'Name': 'email', 'Class': 'min-w-0 flex-1', 'Attrs': ui_attrs(['id', ui_tpl('{0}-email', [v_id]), 'data-testid', 'field'])}}, with_context = false) }}
{%- set c_3 -%}
{{ ui_text(ui_get(v_signup, ['submit'])) }}
{%- endset -%}
{{ include('ui/button/button.html.twig', {'p': {'Variant': 'default', 'Size': 'default', 'Type': 'submit', 'Attrs': ui_attrs(['data-testid', 'submit'])}, 'children': c_3}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '2', 'Align': 'start', 'Class': 'w-full flex-wrap'}, 'children': c_4}, with_context = false) }}
{%- endset -%}
{{ include('ui/form/form.html.twig', {'p': {'Method': 'dialog', 'Class': ui_s(ui_cnv(['w-full max-w-md', (ui_t(false) ? 'mx-auto' : '')])), 'Attrs': ui_attrs(['data-testid', 'email-form'])}, 'children': c_5}, with_context = false) }}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '4', 'Class': 'max-w-md', 'Attrs': ui_attrs(['data-testid', 'signup'])}, 'children': c_6}, with_context = false) }}
{%- endif %}
{%- if ui_t(ui_eq(v_layout, 'columns')) %}
{%- set c_11 -%}
{%- set c_9 -%}
{%- set c_7 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'xl', 'Weight': 'bold'}, 'children': c_7}, with_context = false) }}
{%- set c_8 -%}
{{ ui_text(v_tagline) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_8}, with_context = false) }}
{%- endset -%}
{{ include('ui/stack/stack.html.twig', {'p': {'Gap': '2', 'Class': 'md:w-64 md:shrink-0'}, 'children': c_9}, with_context = false) }}
{%- set c_10 -%}
{{ include('blocks/footer-columns.html.twig', {'p': {'label': v_label, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'min-w-0 flex-1'}, 'children': c_10}, with_context = false) }}
{%- endset -%}
{{ include('ui/box/box.html.twig', {'p': {'Class': 'flex flex-col gap-8 md:flex-row md:items-start md:gap-12', 'Attrs': ui_attrs(['data-slot', 'footer-top'])}, 'children': c_11}, with_context = false) }}
{%- else %}
{%- set c_16 -%}
{%- set c_12 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'base', 'Weight': 'bold'}, 'children': c_12}, with_context = false) }}
{%- set c_15 -%}
{%- set c_14 -%}
{%- for v_g in ui_l(v_groups) %}
{%- set c_13 -%}
{{ ui_text(ui_get(v_g, ['title'])) }}
{%- endset -%}
{{ include('ui/link/link.html.twig', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-sm', 'Attrs': ui_attrs(['data-testid', 'group'])}, 'children': c_13}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Class': 'flex-wrap'}, 'children': c_14}, with_context = false) }}
{%- endset -%}
{{ include('blocks/nav-block.html.twig', {'p': {'label': (ui_t(v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) : v_label)}, 'children': c_15}, with_context = false) }}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '6', 'Align': 'center', 'Justify': 'between', 'Class': 'flex-wrap'}, 'children': c_16}, with_context = false) }}
{%- endif %}
{%- set c_19 -%}
{%- set c_17 -%}
{{ ui_text(v_copyright) }}
{%- endset -%}
{{ include('ui/text/text.html.twig', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_17}, with_context = false) }}
{%- if ui_t(ui_eq(ui_get(v_status, ['mode']), 'show')) %}
{%- set c_18 -%}
{{ ui_text(ui_get(v_status, ['label'])) }}
{%- endset -%}
{{ include('blocks/pill.html.twig', {'p': {'tone': 'green', 'icon': 'circle-check'}, 'children': c_18}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('ui/group/group.html.twig', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between', 'Class': 'flex-wrap border-t border-border pt-6'}, 'children': c_19}, with_context = false) }}
{%- endset -%}
{{ include('ui/container/container.html.twig', {'p': {'Class': ui_s(ui_cnv(['mx-auto w-full max-w-6xl px-4', 'flex flex-col gap-8', (ui_t(ui_eq(v_density, 'compact')) ? 'py-6' : 'py-12')])), 'Attrs': ui_attrs(['data-slot', 'container'])}, 'children': c_20}, with_context = false) }}
{%- endset -%}
{{ include('ui/block/block.html.twig', {'p': {'Tag': 'footer', 'Class': 'mt-12 border-t border-border', 'Attrs': ui_attrs(['data-testid', 'site-footer', 'data-layout', v_layout, 'aria-label', v_landmarkLabel])}, 'children': c_21}, with_context = false) }}
{%- endif %}
Jinja2 is not installed by the CLI. Copy the template files below into your Jinja2 templates, together with the ui8kit_jinja Python package from packages/jinja2/ui of the source:
- py/ui8kit_jinja/__init__.py
- py/ui8kit_jinja/cn_merge.py
- py/ui8kit_jinja/runtime.py
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/nav-bar.json
A top bar in four shapes. Axes: layout (inline: brand left, links, button right; split: the brand in the middle with the links on both sides; search: a search field with its shortcut in the middle), over (none, media: the bar sits over a picture, transparent), actions mode (none, cta), tone (default, inverse: on a dark hero band). Turning solid on scroll is a port contract.
Props (p): label, brand, links, current, actions, search, tone, layout, over, skip, landmarkLabel. -#}
{%- set v_label = ui_def(p['label'], none) -%}
{%- set v_brand = ui_def(p['brand'], none) -%}
{%- set v_links = ui_def(p['links'], none) -%}
{%- set v_current = ui_def(p['current'], '') -%}
{%- set v_actions = ui_def(p['actions'], none) -%}
{%- set v_search = ui_def(p['search'], none) -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_layout = ui_def(p['layout'], 'inline') -%}
{%- set v_over = ui_def(p['over'], 'none') -%}
{%- set v_skip = ui_def(p['skip'], none) -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set c_13 -%}
{{ ui_include('blocks/over-media.html.j2', {'p': {'on': ui_eq(v_over, 'media'), 'alt': v_brand}}) }}
{%- if ui_t(v_skip) %}
{%- set c_1 -%}
{{ ui_text(v_skip) }}
{%- endset -%}
{{ ui_include('ui/link-plain/link-plain.html.j2', {'p': {'Href': '#main-content', 'Class': 'sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:inset-ring focus:inset-ring-border', 'Attrs': ui_attrs(['data-testid', 'skip-link'])}, 'children': c_1}) }}
{%- endif %}
{%- set c_12 -%}
{%- set c_11 -%}
{%- if ui_t(ui_eq(v_layout, 'split')) %}
{%- set c_8 -%}
{%- set c_7 -%}
{%- set c_2 -%}
{{ ui_include('blocks/nav-links.html.j2', {'p': {'links': v_links, 'current': v_current, 'side': 'left'}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'md:justify-self-start'}, 'children': c_2}) }}
{%- set c_4 -%}
{%- set c_3 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ ui_include('ui/link/link.html.j2', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-lg font-medium', 'Attrs': ui_attrs(['data-testid', 'brand'])}, 'children': c_3}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'text-center'}, 'children': c_4}) }}
{%- set c_6 -%}
{%- set c_5 -%}
{{ ui_include('blocks/nav-links.html.j2', {'p': {'links': v_links, 'current': v_current, 'side': 'right'}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {}, 'children': c_5}) }}
{{ ui_include('blocks/nav-actions.html.j2', {'p': {'login': ui_get(v_actions, ['login']), 'loginHref': ui_get(v_actions, ['loginHref']), 'cta': ui_get(v_actions, ['cta']), 'ctaHref': ui_get(v_actions, ['href']), 'actions': ui_get(v_actions, ['mode']), 'tone': v_tone, 'themeLabel': ui_get(v_actions, ['themeLabel'])}}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'end', 'Class': 'flex-wrap md:justify-self-end'}, 'children': c_6}) }}
{%- endset -%}
{{ ui_include('ui/grid/grid.html.j2', {'p': {'Cols': '1-3', 'Class': 'w-full items-center gap-4'}, 'children': c_7}) }}
{%- endset -%}
{{ ui_include('blocks/nav-block.html.j2', {'p': {'label': (ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) if ui_t(v_landmarkLabel) else v_label), 'className': ui_cnv(['w-full']), 'testid': 'site-nav'}, 'children': c_8}) }}
{%- else %}
{%- set c_9 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ ui_include('ui/link/link.html.j2', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-lg font-medium', 'Attrs': ui_attrs(['data-testid', 'brand'])}, 'children': c_9}) }}
{%- if ui_t(ui_eq(v_layout, 'search')) %}
{{ ui_include('blocks/search-palette.html.j2', {'p': {'label': ui_get(v_search, ['label']), 'shortcut': ui_get(v_search, ['shortcut'])}}) }}
{%- endif %}
{%- set c_10 -%}
{{ ui_include('blocks/nav-links.html.j2', {'p': {'links': v_links, 'current': v_current}}) }}
{%- endset -%}
{{ ui_include('blocks/nav-block.html.j2', {'p': {'label': (ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) if ui_t(v_landmarkLabel) else v_label), 'className': ui_cnv(['order-last w-full overflow-x-auto md:order-none md:w-auto [&>div]:flex-nowrap md:[&>div]:flex-wrap [&_a]:shrink-0']), 'testid': 'site-nav'}, 'children': c_10}) }}
{{ ui_include('blocks/nav-actions.html.j2', {'p': {'login': ui_get(v_actions, ['login']), 'loginHref': ui_get(v_actions, ['loginHref']), 'cta': ui_get(v_actions, ['cta']), 'ctaHref': ui_get(v_actions, ['href']), 'actions': ui_get(v_actions, ['mode']), 'tone': v_tone, 'themeLabel': ui_get(v_actions, ['themeLabel'])}}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': ui_s(ui_cnv(['flex flex-wrap items-center justify-between gap-4', 'py-4']))}, 'children': c_11}) }}
{%- endset -%}
{{ ui_include('ui/container/container.html.j2', {'p': {'Class': 'mx-auto w-full max-w-6xl px-4', 'Attrs': ui_attrs(['data-slot', 'container'])}, 'children': c_12}) }}
{%- endset -%}
{{ ui_include('ui/block/block.html.j2', {'p': {'Tag': 'header', 'Class': ui_s(ui_cnv(['relative', ('border-b border-transparent bg-foreground text-background [&_a]:text-background [&_button]:text-background' if ui_t(ui_eq(v_tone, 'inverse')) else 'border-b border-border bg-background'), ('isolate overflow-hidden border-0 bg-transparent' if ui_t(ui_eq(v_over, 'media')) else '')])), 'Attrs': ui_attrs(['data-testid', 'nav-bar', 'data-layout', v_layout, 'data-tone', v_tone, 'aria-label', v_landmarkLabel])}, 'children': c_13}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/hero-classic.json
The top of a page: heading, lead and actions, with optional media (image, backdrop, code window, cluster). Axes: layout, media kind and side, scale, tone, density, actions mode.
Props (p): id, title, text, level, badge, topics, actions, media, layout, scale, tone, density, landmarkLabel. -#}
{%- set v_id = ui_def(p['id'], none) -%}
{%- set v_title = ui_def(p['title'], none) -%}
{%- set v_text = ui_def(p['text'], none) -%}
{%- set v_level = ui_def(p['level'], 1) -%}
{%- set v_badge = ui_def(p['badge'], none) -%}
{%- set v_topics = ui_def(p['topics'], none) -%}
{%- set v_actions = ui_def(p['actions'], none) -%}
{%- set v_media = ui_def(p['media'], none) -%}
{%- set v_layout = ui_def(p['layout'], 'centered') -%}
{%- set v_scale = ui_def(p['scale'], 'default') -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_density = ui_def(p['density'], 'roomy') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set v_mediaKind = ui_coalesce([ui_get(v_media, ['kind']), 'none']) -%}
{%- set v_mediaSide = ui_coalesce([ui_get(v_media, ['side']), 'end']) -%}
{%- set f_5 -%}
{%- if ui_t(ui_and([ui_eq(v_mediaKind, 'code'), ui_get(v_media, ['lines']), ui_get(v_media, ['codeTitle']), ui_get(v_media, ['prompt'])])) %}
{{ ui_include('blocks/code-window.html.j2', {'p': {'title': ui_get(v_media, ['codeTitle']), 'prompt': ui_get(v_media, ['prompt']), 'lines': ui_get(v_media, ['lines'])}}) }}
{%- endif %}
{%- if ui_t(ui_eq(v_mediaKind, 'cluster')) %}
{%- set c_9 -%}
{%- set c_6 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '3/4'}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': ui_s(ui_cnv(['w-full', '']))}, 'children': c_6}) }}
{%- set c_7 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '4/3'}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': ui_s(ui_cnv(['w-full', '-translate-y-4']))}, 'children': c_7}) }}
{%- set c_8 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '3/4'}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': ui_s(ui_cnv(['w-full', '']))}, 'children': c_8}) }}
{%- endset -%}
{{ ui_include('ui/grid/grid.html.j2', {'p': {'Cols': '3', 'Class': 'items-end gap-4', 'Attrs': ui_attrs(['data-testid', 'cluster'])}, 'children': c_9}) }}
{%- endif %}
{%- if ui_t(ui_or([ui_eq(v_mediaKind, 'image')])) %}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '4/3'}}) }}
{%- endif %}
{%- endset -%}
{%- set c_10 -%}
{{ ui_include('blocks/backdrop.html.j2', {'p': {'kind': ('image' if ui_t(ui_eq(v_mediaKind, 'backdrop')) else 'none'), 'alt': v_title}}) }}
{%- if ui_t(ui_get(v_actions, ['cta'])) %}
{%- if ui_t(ui_eq(ui_get(v_actions, ['mode']), 'form')) %}
{%- set c_4 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_actions, ['emailLabel'])) }}
{%- endset -%}
{{ ui_include('ui/label/label.html.j2', {'p': {'HTMLFor': ui_s(ui_tpl('{0}-email', [v_id])), 'Class': 'sr-only'}, 'children': c_1}) }}
{%- set c_3 -%}
{{ ui_include('ui/input/input.html.j2', {'p': {'Type': 'text', 'Name': 'prompt', 'Class': 'min-w-0 flex-1', 'Placeholder': ui_s(ui_get(v_actions, ['emailLabel'])), 'Attrs': ui_attrs(['id', ui_tpl('{0}-email', [v_id]), 'data-testid', 'field'])}}) }}
{%- set c_2 -%}
{{ ui_text(ui_get(v_actions, ['cta'])) }}
{%- endset -%}
{{ ui_include('ui/button/button.html.j2', {'p': {'Variant': 'default', 'Size': 'default', 'Href': ui_s(ui_coalesce([ui_get(v_actions, ['href']), '#/'])), 'Attrs': ui_attrs(['data-testid', 'submit'])}, 'children': c_2}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '2', 'Align': 'start', 'Class': 'w-full flex-wrap'}, 'children': c_3}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': ui_s(ui_cnv(['w-full max-w-xl', ('mx-auto' if ui_t(ui_eq(v_layout, 'centered')) else '')])), 'Attrs': ui_attrs(['data-testid', 'email-form'])}, 'children': c_4}) }}
{%- else %}
{{ ui_include('blocks/action-group.html.j2', {'p': {'primary': ui_get(v_actions, ['cta']), 'primaryHref': ui_get(v_actions, ['href']), 'secondary': (ui_get(v_actions, ['secondary']) if ui_t(ui_eq(ui_get(v_actions, ['mode']), 'two')) else none), 'secondaryHref': ui_get(v_actions, ['secondaryHref']), 'align': ('center' if ui_t(ui_eq(v_layout, 'centered')) else 'start')}}) }}
{%- endif %}
{%- endif %}
{%- if ui_t(v_topics) %}
{{ ui_include('blocks/topic-chips.html.j2', {'p': {'topics': v_topics}}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_text, 'heading': {'level': v_level, 'scale': v_scale, 'badge': v_badge}, 'layout': ('split' if ui_t(ui_eq(v_layout, 'split')) else 'stack'), 'align': ('start' if ui_t(ui_eq(v_layout, 'split')) else 'center'), 'media': {'show': ui_or([ui_eq(v_mediaKind, 'image'), ui_eq(v_mediaKind, 'code'), ui_eq(v_mediaKind, 'cluster')]), 'side': v_mediaSide}, 'tone': v_tone, 'density': v_density, 'className': ui_cnv([('relative isolate overflow-hidden' if ui_t(ui_eq(('image' if ui_t(ui_eq(v_mediaKind, 'backdrop')) else 'none'), 'image')) else '')]), 'landmarkLabel': v_landmarkLabel, 'aside': f_5}, 'children': c_10}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-grid.json
A section with a heading and the features as a grid of cards or tiles, or as rows with a picture. Icons are Lucide names. Axes: layout (grid, rows), columns, item (card, tile, cell: bordered tile with a round icon), media side (rows), density, tone.
Props (p): id, title, features, action, layout, cols, item, mediaSide, tone, density, landmarkLabel. -#}
{%- set v_id = ui_def(p['id'], none) -%}
{%- set v_title = ui_def(p['title'], none) -%}
{%- set v_features = ui_def(p['features'], none) -%}
{%- set v_action = ui_def(p['action'], none) -%}
{%- set v_layout = ui_def(p['layout'], 'grid') -%}
{%- set v_cols = ui_def(p['cols'], '1-3') -%}
{%- set v_item = ui_def(p['item'], 'card') -%}
{%- set v_mediaSide = ui_def(p['mediaSide'], 'end') -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_density = ui_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- if ui_t(ui_eq(v_item, 'cell')) %}
{%- set c_4 -%}
{%- set c_3 -%}
{%- set c_1 -%}
{{ ui_text(v_title) }}
{%- endset -%}
{{ ui_include('ui/title/title.html.j2', {'p': {'As': ui_i(2), 'Size': 'sm', 'Weight': 'semibold', 'Class': 'leading-7', 'Attrs': ui_attrs(['id', ui_add(v_id, '-title')])}, 'children': c_1}) }}
{%- if ui_t(ui_get(v_action, ['label'])) %}
{%- set c_2 -%}
{{ ui_text(ui_get(v_action, ['label'])) }}
{%- endset -%}
{{ ui_include('ui/link/link.html.j2', {'p': {'Href': ui_s(ui_coalesce([ui_get(v_action, ['href']), '#/'])), 'Variant': 'default', 'Class': ui_s(ui_cnv([ui_preset('blocks/presets/defaults.json', ['text', 'tiny']), 'shrink-0 font-medium leading-5'])), 'Attrs': ui_attrs(['data-testid', 'section-action'])}, 'children': c_2}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between', 'Class': 'w-full'}, 'children': c_3}) }}
{{ ui_include('blocks/feature-cards.html.j2', {'p': {'features': v_features, 'cols': v_cols, 'item': v_item}}) }}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'tone': v_tone, 'density': v_density, 'measure': 'fill', 'className': ui_cnv(['py-0']), 'landmarkLabel': v_landmarkLabel}, 'children': c_4}) }}
{%- else %}
{%- set c_5 -%}
{%- if ui_t(ui_eq(v_layout, 'rows')) %}
{{ ui_include('blocks/feature-rows.html.j2', {'p': {'features': v_features, 'mediaSide': v_mediaSide}}) }}
{%- else %}
{{ ui_include('blocks/feature-cards.html.j2', {'p': {'features': v_features, 'cols': v_cols, 'item': v_item}}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'action': v_action, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': c_5}) }}
{%- endif %}
{
"//": "Code generated by xgen. DO NOT EDIT.",
"specVersion": 1,
"id": "preset.defaults",
"name": "defaults",
"docs": "Default layout preset: the sizes of the landing blocks as Tailwind classes.\nBlocks combine these with token classes; swap the preset to resize every block at once.",
"source": "ui8kit default sizes (Tailwind scale, no arbitrary values)",
"notes": {
"text": "small type steps for chips, badges and links",
"hero.band": "the inverse band: tall section, large bottom radius",
"hero.title": "display title",
"hero.titleWeights": "one font-weight class per title word",
"hero.composer": "the prompt box",
"logos.row": "one centered row of logo slots",
"logos.glyph": "the Lucide glyph inside a slot: half the slot"
},
"values": {
"text": {
"tiny": "text-xs",
"small": "text-sm"
},
"hero": {
"band": "min-h-160 rounded",
"container": "max-w-7xl",
"head": "gap-12",
"badge": "w-48",
"title": "text-5xl leading-tight",
"titleWeights": [
"font-normal",
"font-semibold",
"font-normal",
"font-semibold"
],
"column": "max-w-xl gap-16",
"composer": "h-40 max-w-xl rounded",
"attach": "w-24",
"promptLine": "h-10",
"model": "w-24"
},
"section": {
"landing": "max-w-6xl"
},
"media": {
"rounded": "rounded"
},
"templates": {
"card": "h-60 w-64",
"image": "h-40 w-58 rounded",
"footer": "h-12 min-h-12"
},
"stats": {
"column": "min-h-28",
"figure": "h-12 text-4xl leading-12 md:h-18 md:text-6xl md:leading-18",
"panel": "gap-24 rounded py-20"
},
"features": {
"cells": "rounded"
},
"news": {
"card": "h-56 w-64",
"cover": "h-40 w-64 rounded",
"title": "top-16",
"strip": "h-12 min-h-12"
},
"cta": {
"panel": "rounded py-20",
"title": "max-w-md",
"text": "max-w-2xl",
"button": "w-40"
},
"logos": {
"row": "h-28 max-w-4xl gap-12 pb-8",
"slot": "size-20",
"glyph": 40
},
"footer": {
"card": "h-72 gap-12 rounded",
"brand": "w-48",
"groups": "gap-x-16"
}
}
}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-split.json
Features beside a picture. Axes: layout (grid: four plain features in two columns, cards: four features as cards and the actions, stats: two figure cards over three checked rows beside a square picture, metrics: four metric cards and the actions), mediaSide, tone.
Props (p): id, title, lead, badge, level, features, stats, actions, layout, mediaSide, tone, landmarkLabel. -#}
{%- set v_id = ui_def(p['id'], none) -%}
{%- set v_title = ui_def(p['title'], none) -%}
{%- set v_lead = ui_def(p['lead'], '') -%}
{%- set v_badge = ui_def(p['badge'], '') -%}
{%- set v_level = ui_def(p['level'], 2) -%}
{%- set v_features = ui_def(p['features'], none) -%}
{%- set v_stats = ui_def(p['stats'], none) -%}
{%- set v_actions = ui_def(p['actions'], none) -%}
{%- set v_layout = ui_def(p['layout'], 'grid') -%}
{%- set v_mediaSide = ui_def(p['mediaSide'], 'end') -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set f_1 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': ('1/1' if ui_t(ui_eq(v_layout, 'stats')) else '4/3')}}) }}
{%- endset -%}
{%- set c_2 -%}
{%- if ui_t(ui_eq(v_layout, 'grid')) %}
{{ ui_include('blocks/feature-pairs.html.j2', {'p': {'features': v_features}}) }}
{%- endif %}
{%- if ui_t(ui_eq(v_layout, 'cards')) %}
{{ ui_include('blocks/feature-cards.html.j2', {'p': {'features': v_features, 'cols': '1-2', 'item': 'tile'}}) }}
{%- endif %}
{%- if ui_t(ui_eq(v_layout, 'stats')) %}
{{ ui_include('blocks/feature-stat-rows.html.j2', {'p': {'features': v_features, 'stats': v_stats}}) }}
{%- endif %}
{%- if ui_t(ui_eq(v_layout, 'metrics')) %}
{{ ui_include('blocks/feature-metric-cards.html.j2', {'p': {'stats': v_stats}}) }}
{%- endif %}
{%- if ui_t(ui_or([ui_eq(v_layout, 'cards'), ui_eq(v_layout, 'metrics')])) %}
{{ ui_include('blocks/action-group.html.j2', {'p': {'primary': ui_get(v_actions, ['cta']), 'primaryHref': ui_get(v_actions, ['href']), 'secondary': (ui_get(v_actions, ['secondary']) if ui_t(ui_eq(ui_get(v_actions, ['mode']), 'two')) else none), 'secondaryHref': ui_get(v_actions, ['secondaryHref'])}}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge, 'level': v_level}, 'tone': v_tone, 'layout': 'split', 'media': {'show': true, 'side': v_mediaSide}, 'landmarkLabel': v_landmarkLabel, 'aside': f_1}, 'children': c_2}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-showcase.json
Features as cards under a centered heading. Axes: item (picture: a picture on top, then the title, the text and a read link; panel: a muted panel with a large glyph on top, then the title and the text), cols (3, 4), tone.
Props (p): id, title, lead, features, more, item, cols, tone, landmarkLabel. -#}
{%- set v_id = ui_def(p['id'], none) -%}
{%- set v_title = ui_def(p['title'], none) -%}
{%- set v_lead = ui_def(p['lead'], '') -%}
{%- set v_features = ui_def(p['features'], none) -%}
{%- set v_more = ui_def(p['more'], none) -%}
{%- set v_item = ui_def(p['item'], 'picture') -%}
{%- set v_cols = ui_def(p['cols'], '3') -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set c_8 -%}
{%- set c_7 -%}
{%- for v_f in ui_l(v_features) %}
{%- set c_6 -%}
{%- if ui_t(ui_eq(v_item, 'picture')) %}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': ui_get(v_f, ['title'])}}) }}
{%- else %}
{%- set c_1 -%}
{{ ui_include('ui/lucide-icon/lucide-icon.html.j2', {'p': {'Name': ui_s(ui_get(v_f, ['icon'])), 'Size': 32}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'flex aspect-video items-center justify-center rounded bg-muted text-foreground', 'Attrs': ui_attrs(['data-testid', 'showcase-panel'])}, 'children': c_1}) }}
{%- endif %}
{%- set c_5 -%}
{%- set c_2 -%}
{{ ui_text(ui_get(v_f, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/title/title.html.j2', {'p': {'As': ui_i(3), 'Size': 'base', 'Weight': 'semibold'}, 'children': c_2}) }}
{%- set c_3 -%}
{{ ui_text(ui_get(v_f, ['text'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_3}) }}
{%- if ui_t(ui_eq(v_item, 'picture')) %}
{%- set c_4 -%}
{{ ui_text(v_more) }}
{{ ui_include('ui/lucide-icon/lucide-icon.html.j2', {'p': {'Name': 'arrow-right', 'Size': 16}}) }}
{%- endset -%}
{{ ui_include('ui/link/link.html.j2', {'p': {'Href': '#/', 'Size': 'sm', 'Class': 'mt-auto pt-2', 'Attrs': ui_attrs(['data-testid', 'read'])}, 'children': c_4}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('ui/card/card-content.html.j2', {'p': {'Class': 'flex flex-1 flex-col gap-2'}, 'children': c_5}) }}
{%- endset -%}
{{ ui_include('ui/card/card.html.j2', {'p': {'Variant': 'default', 'Class': 'h-full gap-4 overflow-hidden', 'Attrs': ui_attrs(['data-testid', 'showcase-card'])}, 'children': c_6}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': ui_s(('grid grid-cols-1 gap-6 text-start sm:grid-cols-2 lg:grid-cols-4' if ui_t(ui_eq(v_cols, '4')) else 'grid grid-cols-1 gap-6 text-start sm:grid-cols-2 lg:grid-cols-3'))}, 'children': c_7}) }}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'align': 'center', 'landmarkLabel': v_landmarkLabel}, 'children': c_8}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/bento-grid.json
Tiles of different sizes in one grid: the large and wide tiles hold the important features. Sizes come from the data (large, wide, small). Axes: layout (bento, even: all tiles alike), media (none, image: a picture in the large tiles), tone, density.
Props (p): id, title, tiles, layout, media, tone, density, landmarkLabel. -#}
{%- set k_SPAN = {'large': 'md:col-span-2 md:row-span-2', 'wide': 'md:col-span-2', 'small': ''} -%}
{%- set v_id = ui_def(p['id'], none) -%}
{%- set v_title = ui_def(p['title'], none) -%}
{%- set v_tiles = ui_def(p['tiles'], none) -%}
{%- set v_layout = ui_def(p['layout'], 'bento') -%}
{%- set v_media = ui_def(p['media'], 'none') -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_density = ui_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set c_6 -%}
{%- set c_5 -%}
{%- for v_tile in ui_l(v_tiles) %}
{%- set c_4 -%}
{%- set c_3 -%}
{{ ui_include('ui/lucide-icon/lucide-icon.html.j2', {'p': {'Name': ui_s(ui_get(v_tile, ['icon'])), 'Size': 24}}) }}
{%- set c_1 -%}
{{ ui_text(ui_get(v_tile, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/title/title.html.j2', {'p': {'As': ui_i(3), 'Size': 'xl', 'Weight': 'bold'}, 'children': c_1}) }}
{%- set c_2 -%}
{{ ui_text(ui_get(v_tile, ['text'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}
{%- if ui_t(ui_and([ui_eq(v_media, 'image'), ui_or([ui_eq(ui_get(v_tile, ['size']), 'large'), ui_eq(v_layout, 'even')])])) %}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': ui_get(v_tile, ['title']), 'ratio': '4/3', 'className': ui_cnv(['mt-auto'])}}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('ui/card/card-content.html.j2', {'p': {'Class': 'flex h-full flex-col gap-4'}, 'children': c_3}) }}
{%- endset -%}
{{ ui_include('ui/card/card.html.j2', {'p': {'Variant': 'default', 'Class': ui_s(ui_cnv(['h-full overflow-hidden', ('gap-4 p-4' if ui_t(ui_eq(v_density, 'compact')) else ''), (ui_at(k_SPAN, ui_get(v_tile, ['size'])) if ui_t(ui_eq(v_layout, 'bento')) else '')])), 'Attrs': ui_attrs(['data-testid', 'item', 'data-size', (ui_get(v_tile, ['size']) if ui_t(ui_eq(v_layout, 'bento')) else 'even')])}, 'children': c_4}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/grid/grid.html.j2', {'p': {'Cols': '1-4', 'Class': 'auto-rows-fr gap-4', 'Attrs': ui_attrs(['data-testid', 'items'])}, 'children': c_5}) }}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': c_6}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-tabs.json
Features behind a tab list: the chosen tab shows its text and a picture. The page keeps the chosen tab (`active`, empty for the first) and updates it on the `select` event. Axes: panel (split: text beside the picture, stack: picture below), tone, density.
Props (p): id, title, features, tabsLabel, active, panel, tone, density, landmarkLabel. -#}
{%- set v_id = ui_def(p['id'], none) -%}
{%- set v_title = ui_def(p['title'], none) -%}
{%- set v_features = ui_def(p['features'], none) -%}
{%- set v_tabsLabel = ui_def(p['tabsLabel'], none) -%}
{%- set v_active = ui_def(p['active'], '') -%}
{%- set v_panel = ui_def(p['panel'], 'split') -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_density = ui_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set c_8 -%}
{%- set c_7 -%}
{%- set c_2 -%}
{%- for v_f in ui_l(v_features) %}
{%- set v_i = loop.index0 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_f, ['title'])) }}
{%- endset -%}
{{ ui_include('blocks/switcher-item.html.j2', {'p': {'active': ui_or([ui_eq(ui_get(v_f, ['id']), v_active), ui_and([ui_eq(v_active, ''), ui_eq(v_i, 0)])])}, 'children': c_1}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('blocks/switcher.html.j2', {'p': {'label': v_tabsLabel, 'className': ui_cnv(['w-fit max-w-full flex-wrap'])}, 'children': c_2}) }}
{%- for v_f in ui_l(v_features) %}
{%- set v_i = loop.index0 -%}
{%- if ui_t(ui_or([ui_eq(ui_get(v_f, ['id']), v_active), ui_and([ui_eq(v_active, ''), ui_eq(v_i, 0)])])) %}
{%- set c_6 -%}
{%- set c_5 -%}
{{ ui_include('ui/lucide-icon/lucide-icon.html.j2', {'p': {'Name': ui_s(ui_get(v_f, ['icon'])), 'Size': 24}}) }}
{%- set c_3 -%}
{{ ui_text(ui_get(v_f, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/title/title.html.j2', {'p': {'As': ui_i(3), 'Size': '2xl', 'Weight': 'bold'}, 'children': c_3}) }}
{%- set c_4 -%}
{{ ui_text(ui_get(v_f, ['text'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'base', 'Class': 'text-muted-foreground'}, 'children': c_4}) }}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '4'}, 'children': c_5}) }}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': ui_get(v_f, ['title']), 'ratio': '4/3'}}) }}
{%- endset -%}
{{ ui_include('ui/grid/grid.html.j2', {'p': {'Cols': ui_s(('1-2' if ui_t(ui_eq(v_panel, 'split')) else '1')), 'Class': 'items-center gap-8', 'Attrs': ui_attrs(['data-testid', 'tab-panel', 'role', 'tabpanel'])}, 'children': c_6}) }}
{%- endif %}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '6', 'Align': 'stretch'}, 'children': c_7}) }}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': c_8}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-accordion.json
Features as a list of disclosures: icon and title in the summary, the text when open. Axes: expand (first: the first one is open, none: all closed), media (none, image: a picture beside the list), tone, density.
Props (p): id, title, features, expand, media, multiple, tone, density, landmarkLabel. -#}
{%- set v_id = ui_def(p['id'], none) -%}
{%- set v_title = ui_def(p['title'], none) -%}
{%- set v_features = ui_def(p['features'], none) -%}
{%- set v_expand = ui_def(p['expand'], 'first') -%}
{%- set v_media = ui_def(p['media'], 'none') -%}
{%- set v_multiple = ui_def(p['multiple'], false) -%}
{%- set v_tone = ui_def(p['tone'], 'default') -%}
{%- set v_density = ui_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- set f_7 -%}
{{ ui_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '4/3'}}) }}
{%- endset -%}
{%- set c_8 -%}
{%- set c_6 -%}
{%- for v_f in ui_l(v_features) %}
{%- set v_i = loop.index0 -%}
{%- set c_5 -%}
{%- set c_3 -%}
{%- set c_2 -%}
{{ ui_include('ui/lucide-icon/lucide-icon.html.j2', {'p': {'Name': ui_s(ui_get(v_f, ['icon'])), 'Size': 20}}) }}
{%- set c_1 -%}
{{ ui_text(ui_get(v_f, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/inline/inline.html.j2', {'p': {'Class': 'text-base font-semibold'}, 'children': c_1}) }}
{%- endset -%}
{{ ui_include('ui/inline/inline.html.j2', {'p': {'Class': 'flex min-w-0 items-center justify-start gap-4'}, 'children': c_2}) }}
{%- endset -%}
{{ ui_include('ui/disclosure/summary.html.j2', {'p': {'Variant': 'item'}, 'children': c_3}) }}
{%- set c_4 -%}
{{ ui_text(ui_get(v_f, ['text'])) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Class': 'pb-4 text-muted-foreground'}, 'children': c_4}) }}
{%- endset -%}
{{ ui_include('ui/disclosure/disclosure.html.j2', {'p': {'Variant': 'item', 'Name': ui_s((none if ui_t(v_multiple) else ui_tpl('{0}-accordion', [ui_coalesce([v_id, 'accordion'])]))), 'Open': ui_t(ui_and([ui_eq(v_expand, 'first'), ui_eq(v_i, 0)])), 'Attrs': ui_attrs(['data-testid', 'item'])}, 'children': c_5}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '0', 'Align': 'stretch', 'Attrs': ui_attrs(['data-testid', 'items'])}, 'children': c_6}) }}
{%- endset -%}
{{ ui_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'layout': ('split' if ui_t(ui_eq(v_media, 'image')) else 'stack'), 'media': {'show': ui_eq(v_media, 'image')}, 'landmarkLabel': v_landmarkLabel, 'aside': f_7}, 'children': c_8}) }}
{#- Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/sitemap-footer.json
A footer with the brand, a tagline, groups of links and the copyright. Axes: layout (columns: brand above, equal columns per group, row: the brand, the group names and the copyright in one row), signup mode (none, first: a sign-up above the links), status mode (none, show: a live status pill), density. The live status itself is a port contract.
Props (p): label, brand, tagline, copyright, groups, signup, status, id, layout, density, landmarkLabel. -#}
{%- set v_label = ui_def(p['label'], none) -%}
{%- set v_brand = ui_def(p['brand'], none) -%}
{%- set v_tagline = ui_def(p['tagline'], none) -%}
{%- set v_copyright = ui_def(p['copyright'], none) -%}
{%- set v_groups = ui_def(p['groups'], none) -%}
{%- set v_signup = ui_def(p['signup'], none) -%}
{%- set v_status = ui_def(p['status'], none) -%}
{%- set v_id = ui_def(p['id'], 'footer') -%}
{%- set v_layout = ui_def(p['layout'], 'columns') -%}
{%- set v_density = ui_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = ui_def(p['landmarkLabel'], none) -%}
{%- if ui_t(ui_eq(v_layout, 'card')) %}
{{ ui_include('blocks/footer-card.html.j2', {'p': {'label': v_label, 'brand': v_brand, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}) }}
{%- else %}
{%- set c_21 -%}
{%- set c_20 -%}
{%- if ui_t(ui_eq(ui_get(v_signup, ['mode']), 'first')) %}
{%- set c_6 -%}
{%- set c_1 -%}
{{ ui_text(ui_get(v_signup, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/title/title.html.j2', {'p': {'As': ui_i(3), 'Size': 'xl', 'Weight': 'bold'}, 'children': c_1}) }}
{%- set c_5 -%}
{%- set c_2 -%}
{{ ui_text(ui_get(v_signup, ['label'])) }}
{%- endset -%}
{{ ui_include('ui/label/label.html.j2', {'p': {'HTMLFor': ui_s(ui_tpl('{0}-email', [v_id])), 'Class': 'sr-only'}, 'children': c_2}) }}
{%- set c_4 -%}
{{ ui_include('ui/input/input.html.j2', {'p': {'Type': 'email', 'Name': 'email', 'Class': 'min-w-0 flex-1', 'Attrs': ui_attrs(['id', ui_tpl('{0}-email', [v_id]), 'data-testid', 'field'])}}) }}
{%- set c_3 -%}
{{ ui_text(ui_get(v_signup, ['submit'])) }}
{%- endset -%}
{{ ui_include('ui/button/button.html.j2', {'p': {'Variant': 'default', 'Size': 'default', 'Type': 'submit', 'Attrs': ui_attrs(['data-testid', 'submit'])}, 'children': c_3}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '2', 'Align': 'start', 'Class': 'w-full flex-wrap'}, 'children': c_4}) }}
{%- endset -%}
{{ ui_include('ui/form/form.html.j2', {'p': {'Method': 'dialog', 'Class': ui_s(ui_cnv(['w-full max-w-md', ('mx-auto' if ui_t(false) else '')])), 'Attrs': ui_attrs(['data-testid', 'email-form'])}, 'children': c_5}) }}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '4', 'Class': 'max-w-md', 'Attrs': ui_attrs(['data-testid', 'signup'])}, 'children': c_6}) }}
{%- endif %}
{%- if ui_t(ui_eq(v_layout, 'columns')) %}
{%- set c_11 -%}
{%- set c_9 -%}
{%- set c_7 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'xl', 'Weight': 'bold'}, 'children': c_7}) }}
{%- set c_8 -%}
{{ ui_text(v_tagline) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_8}) }}
{%- endset -%}
{{ ui_include('ui/stack/stack.html.j2', {'p': {'Gap': '2', 'Class': 'md:w-64 md:shrink-0'}, 'children': c_9}) }}
{%- set c_10 -%}
{{ ui_include('blocks/footer-columns.html.j2', {'p': {'label': v_label, 'groups': v_groups, 'landmarkLabel': v_landmarkLabel}}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'min-w-0 flex-1'}, 'children': c_10}) }}
{%- endset -%}
{{ ui_include('ui/box/box.html.j2', {'p': {'Class': 'flex flex-col gap-8 md:flex-row md:items-start md:gap-12', 'Attrs': ui_attrs(['data-slot', 'footer-top'])}, 'children': c_11}) }}
{%- else %}
{%- set c_16 -%}
{%- set c_12 -%}
{{ ui_text(v_brand) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'base', 'Weight': 'bold'}, 'children': c_12}) }}
{%- set c_15 -%}
{%- set c_14 -%}
{%- for v_g in ui_l(v_groups) %}
{%- set c_13 -%}
{{ ui_text(ui_get(v_g, ['title'])) }}
{%- endset -%}
{{ ui_include('ui/link/link.html.j2', {'p': {'Href': '#/', 'Variant': 'default', 'Class': 'text-sm', 'Attrs': ui_attrs(['data-testid', 'group'])}, 'children': c_13}) }}
{%- endfor %}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Class': 'flex-wrap'}, 'children': c_14}) }}
{%- endset -%}
{{ ui_include('blocks/nav-block.html.j2', {'p': {'label': (ui_uniq(ui_tpl('{0}, {1}', [v_label, v_landmarkLabel])) if ui_t(v_landmarkLabel) else v_label)}, 'children': c_15}) }}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '6', 'Align': 'center', 'Justify': 'between', 'Class': 'flex-wrap'}, 'children': c_16}) }}
{%- endif %}
{%- set c_19 -%}
{%- set c_17 -%}
{{ ui_text(v_copyright) }}
{%- endset -%}
{{ ui_include('ui/text/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_17}) }}
{%- if ui_t(ui_eq(ui_get(v_status, ['mode']), 'show')) %}
{%- set c_18 -%}
{{ ui_text(ui_get(v_status, ['label'])) }}
{%- endset -%}
{{ ui_include('blocks/pill.html.j2', {'p': {'tone': 'green', 'icon': 'circle-check'}, 'children': c_18}) }}
{%- endif %}
{%- endset -%}
{{ ui_include('ui/group/group.html.j2', {'p': {'Gap': '4', 'Align': 'center', 'Justify': 'between', 'Class': 'flex-wrap border-t border-border pt-6'}, 'children': c_19}) }}
{%- endset -%}
{{ ui_include('ui/container/container.html.j2', {'p': {'Class': ui_s(ui_cnv(['mx-auto w-full max-w-6xl px-4', 'flex flex-col gap-8', ('py-6' if ui_t(ui_eq(v_density, 'compact')) else 'py-12')])), 'Attrs': ui_attrs(['data-slot', 'container'])}, 'children': c_20}) }}
{%- endset -%}
{{ ui_include('ui/block/block.html.j2', {'p': {'Tag': 'footer', 'Class': 'mt-12 border-t border-border', 'Attrs': ui_attrs(['data-testid', 'site-footer', 'data-layout', v_layout, 'aria-label', v_landmarkLabel])}, 'children': c_21}) }}
{%- endif %}
Latte is not installed by the CLI. Copy the template files below into your Latte templates, together with these helper files from packages/latte/ui of the source (the Runtime, CnMerge and the Latte extension):
- php/CnMerge.php
- php/Extension.php
- php/Runtime.php
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/nav-bar.json
A top bar in four shapes. Axes: layout (inline: brand left, links, button right; split: the brand in the middle with the links on both sides; search: a search field with its shortcut in the middle), over (none, media: the bar sits over a picture, transparent), actions mode (none, cta), tone (default, inverse: on a dark hero band). Turning solid on scroll is a port contract.
Props (p): label, brand, links, current, actions, search, tone, layout, over, skip, landmarkLabel. *}
{var $v_label = ($p['label'] ?? null)}
{var $v_brand = ($p['brand'] ?? null)}
{var $v_links = ($p['links'] ?? null)}
{var $v_current = ($p['current'] ?? '')}
{var $v_actions = ($p['actions'] ?? null)}
{var $v_search = ($p['search'] ?? null)}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_layout = ($p['layout'] ?? 'inline')}
{var $v_over = ($p['over'] ?? 'none')}
{var $v_skip = ($p['skip'] ?? null)}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_13}
{=ui_include('blocks/over-media.latte', ['p' => ['on' => ui_eq($v_over, 'media'), 'alt' => $v_brand]])|noescape}
{if ui_t($v_skip)}
{capture $c_1}
{=ui_text($v_skip)}
{/capture}
{=ui_include('ui/link-plain/link-plain.latte', ['p' => ['Href' => '#main-content', 'Class' => 'sr-only focus:not-sr-only focus:fixed focus:left-2 focus:top-2 focus:z-50 focus:rounded focus:bg-background focus:px-4 focus:py-2 focus:text-sm focus:inset-ring focus:inset-ring-border', 'Attrs' => ui_attrs(['data-testid', 'skip-link'])], 'children' => $c_1])|noescape}
{/if}
{capture $c_12}
{capture $c_11}
{if ui_t(ui_eq($v_layout, 'split'))}
{capture $c_8}
{capture $c_7}
{capture $c_2}
{=ui_include('blocks/nav-links.latte', ['p' => ['links' => $v_links, 'current' => $v_current, 'side' => 'left']])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'md:justify-self-start'], 'children' => $c_2])|noescape}
{capture $c_4}
{capture $c_3}
{=ui_text($v_brand)}
{/capture}
{=ui_include('ui/link/link.latte', ['p' => ['Href' => '#/', 'Variant' => 'default', 'Class' => 'text-lg font-medium', 'Attrs' => ui_attrs(['data-testid', 'brand'])], 'children' => $c_3])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'text-center'], 'children' => $c_4])|noescape}
{capture $c_6}
{capture $c_5}
{=ui_include('blocks/nav-links.latte', ['p' => ['links' => $v_links, 'current' => $v_current, 'side' => 'right']])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => [], 'children' => $c_5])|noescape}
{=ui_include('blocks/nav-actions.latte', ['p' => ['login' => ui_get($v_actions, ['login']), 'loginHref' => ui_get($v_actions, ['loginHref']), 'cta' => ui_get($v_actions, ['cta']), 'ctaHref' => ui_get($v_actions, ['href']), 'actions' => ui_get($v_actions, ['mode']), 'tone' => $v_tone, 'themeLabel' => ui_get($v_actions, ['themeLabel'])]])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Align' => 'center', 'Justify' => 'end', 'Class' => 'flex-wrap md:justify-self-end'], 'children' => $c_6])|noescape}
{/capture}
{=ui_include('ui/grid/grid.latte', ['p' => ['Cols' => '1-3', 'Class' => 'w-full items-center gap-4'], 'children' => $c_7])|noescape}
{/capture}
{=ui_include('blocks/nav-block.latte', ['p' => ['label' => (ui_t($v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [$v_label, $v_landmarkLabel])) : $v_label), 'className' => ui_cnv(['w-full']), 'testid' => 'site-nav'], 'children' => $c_8])|noescape}
{else}
{capture $c_9}
{=ui_text($v_brand)}
{/capture}
{=ui_include('ui/link/link.latte', ['p' => ['Href' => '#/', 'Variant' => 'default', 'Class' => 'text-lg font-medium', 'Attrs' => ui_attrs(['data-testid', 'brand'])], 'children' => $c_9])|noescape}
{if ui_t(ui_eq($v_layout, 'search'))}
{=ui_include('blocks/search-palette.latte', ['p' => ['label' => ui_get($v_search, ['label']), 'shortcut' => ui_get($v_search, ['shortcut'])]])|noescape}
{/if}
{capture $c_10}
{=ui_include('blocks/nav-links.latte', ['p' => ['links' => $v_links, 'current' => $v_current]])|noescape}
{/capture}
{=ui_include('blocks/nav-block.latte', ['p' => ['label' => (ui_t($v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [$v_label, $v_landmarkLabel])) : $v_label), 'className' => ui_cnv(['order-last w-full overflow-x-auto md:order-none md:w-auto [&>div]:flex-nowrap md:[&>div]:flex-wrap [&_a]:shrink-0']), 'testid' => 'site-nav'], 'children' => $c_10])|noescape}
{=ui_include('blocks/nav-actions.latte', ['p' => ['login' => ui_get($v_actions, ['login']), 'loginHref' => ui_get($v_actions, ['loginHref']), 'cta' => ui_get($v_actions, ['cta']), 'ctaHref' => ui_get($v_actions, ['href']), 'actions' => ui_get($v_actions, ['mode']), 'tone' => $v_tone, 'themeLabel' => ui_get($v_actions, ['themeLabel'])]])|noescape}
{/if}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => ui_s(ui_cnv(['flex flex-wrap items-center justify-between gap-4', 'py-4']))], 'children' => $c_11])|noescape}
{/capture}
{=ui_include('ui/container/container.latte', ['p' => ['Class' => 'mx-auto w-full max-w-6xl px-4', 'Attrs' => ui_attrs(['data-slot', 'container'])], 'children' => $c_12])|noescape}
{/capture}
{=ui_include('ui/block/block.latte', ['p' => ['Tag' => 'header', 'Class' => ui_s(ui_cnv(['relative', (ui_t(ui_eq($v_tone, 'inverse')) ? 'border-b border-transparent bg-foreground text-background [&_a]:text-background [&_button]:text-background' : 'border-b border-border bg-background'), (ui_t(ui_eq($v_over, 'media')) ? 'isolate overflow-hidden border-0 bg-transparent' : '')])), 'Attrs' => ui_attrs(['data-testid', 'nav-bar', 'data-layout', $v_layout, 'data-tone', $v_tone, 'aria-label', $v_landmarkLabel])], 'children' => $c_13])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/hero-classic.json
The top of a page: heading, lead and actions, with optional media (image, backdrop, code window, cluster). Axes: layout, media kind and side, scale, tone, density, actions mode.
Props (p): id, title, text, level, badge, topics, actions, media, layout, scale, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_text = ($p['text'] ?? null)}
{var $v_level = ($p['level'] ?? 1)}
{var $v_badge = ($p['badge'] ?? null)}
{var $v_topics = ($p['topics'] ?? null)}
{var $v_actions = ($p['actions'] ?? null)}
{var $v_media = ($p['media'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'centered')}
{var $v_scale = ($p['scale'] ?? 'default')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'roomy')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{var $v_mediaKind = ui_coalesce([ui_get($v_media, ['kind']), 'none'])}
{var $v_mediaSide = ui_coalesce([ui_get($v_media, ['side']), 'end'])}
{capture $f_5}
{if ui_t(ui_and([ui_eq($v_mediaKind, 'code'), ui_get($v_media, ['lines']), ui_get($v_media, ['codeTitle']), ui_get($v_media, ['prompt'])]))}
{=ui_include('blocks/code-window.latte', ['p' => ['title' => ui_get($v_media, ['codeTitle']), 'prompt' => ui_get($v_media, ['prompt']), 'lines' => ui_get($v_media, ['lines'])]])|noescape}
{/if}
{if ui_t(ui_eq($v_mediaKind, 'cluster'))}
{capture $c_9}
{capture $c_6}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '3/4']])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => ui_s(ui_cnv(['w-full', '']))], 'children' => $c_6])|noescape}
{capture $c_7}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '4/3']])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => ui_s(ui_cnv(['w-full', '-translate-y-4']))], 'children' => $c_7])|noescape}
{capture $c_8}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '3/4']])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => ui_s(ui_cnv(['w-full', '']))], 'children' => $c_8])|noescape}
{/capture}
{=ui_include('ui/grid/grid.latte', ['p' => ['Cols' => '3', 'Class' => 'items-end gap-4', 'Attrs' => ui_attrs(['data-testid', 'cluster'])], 'children' => $c_9])|noescape}
{/if}
{if ui_t(ui_or([ui_eq($v_mediaKind, 'image')]))}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '4/3']])|noescape}
{/if}
{/capture}
{capture $c_10}
{=ui_include('blocks/backdrop.latte', ['p' => ['kind' => (ui_t(ui_eq($v_mediaKind, 'backdrop')) ? 'image' : 'none'), 'alt' => $v_title]])|noescape}
{if ui_t(ui_get($v_actions, ['cta']))}
{if ui_t(ui_eq(ui_get($v_actions, ['mode']), 'form'))}
{capture $c_4}
{capture $c_1}
{=ui_text(ui_get($v_actions, ['emailLabel']))}
{/capture}
{=ui_include('ui/label/label.latte', ['p' => ['HTMLFor' => ui_s(ui_tpl('{0}-email', [$v_id])), 'Class' => 'sr-only'], 'children' => $c_1])|noescape}
{capture $c_3}
{=ui_include('ui/input/input.latte', ['p' => ['Type' => 'text', 'Name' => 'prompt', 'Class' => 'min-w-0 flex-1', 'Placeholder' => ui_s(ui_get($v_actions, ['emailLabel'])), 'Attrs' => ui_attrs(['id', ui_tpl('{0}-email', [$v_id]), 'data-testid', 'field'])]])|noescape}
{capture $c_2}
{=ui_text(ui_get($v_actions, ['cta']))}
{/capture}
{=ui_include('ui/button/button.latte', ['p' => ['Variant' => 'default', 'Size' => 'default', 'Href' => ui_s(ui_coalesce([ui_get($v_actions, ['href']), '#/'])), 'Attrs' => ui_attrs(['data-testid', 'submit'])], 'children' => $c_2])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '2', 'Align' => 'start', 'Class' => 'w-full flex-wrap'], 'children' => $c_3])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => ui_s(ui_cnv(['w-full max-w-xl', (ui_t(ui_eq($v_layout, 'centered')) ? 'mx-auto' : '')])), 'Attrs' => ui_attrs(['data-testid', 'email-form'])], 'children' => $c_4])|noescape}
{else}
{=ui_include('blocks/action-group.latte', ['p' => ['primary' => ui_get($v_actions, ['cta']), 'primaryHref' => ui_get($v_actions, ['href']), 'secondary' => (ui_t(ui_eq(ui_get($v_actions, ['mode']), 'two')) ? ui_get($v_actions, ['secondary']) : null), 'secondaryHref' => ui_get($v_actions, ['secondaryHref']), 'align' => (ui_t(ui_eq($v_layout, 'centered')) ? 'center' : 'start')]])|noescape}
{/if}
{/if}
{if ui_t($v_topics)}
{=ui_include('blocks/topic-chips.latte', ['p' => ['topics' => $v_topics]])|noescape}
{/if}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_text, 'heading' => ['level' => $v_level, 'scale' => $v_scale, 'badge' => $v_badge], 'layout' => (ui_t(ui_eq($v_layout, 'split')) ? 'split' : 'stack'), 'align' => (ui_t(ui_eq($v_layout, 'split')) ? 'start' : 'center'), 'media' => ['show' => ui_or([ui_eq($v_mediaKind, 'image'), ui_eq($v_mediaKind, 'code'), ui_eq($v_mediaKind, 'cluster')]), 'side' => $v_mediaSide], 'tone' => $v_tone, 'density' => $v_density, 'className' => ui_cnv([(ui_t(ui_eq((ui_t(ui_eq($v_mediaKind, 'backdrop')) ? 'image' : 'none'), 'image')) ? 'relative isolate overflow-hidden' : '')]), 'landmarkLabel' => $v_landmarkLabel, 'aside' => $f_5], 'children' => $c_10])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-grid.json
A section with a heading and the features as a grid of cards or tiles, or as rows with a picture. Icons are Lucide names. Axes: layout (grid, rows), columns, item (card, tile, cell: bordered tile with a round icon), media side (rows), density, tone.
Props (p): id, title, features, action, layout, cols, item, mediaSide, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_features = ($p['features'] ?? null)}
{var $v_action = ($p['action'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'grid')}
{var $v_cols = ($p['cols'] ?? '1-3')}
{var $v_item = ($p['item'] ?? 'card')}
{var $v_mediaSide = ($p['mediaSide'] ?? 'end')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{if ui_t(ui_eq($v_item, 'cell'))}
{capture $c_4}
{capture $c_3}
{capture $c_1}
{=ui_text($v_title)}
{/capture}
{=ui_include('ui/title/title.latte', ['p' => ['As' => ui_i(2), 'Size' => 'sm', 'Weight' => 'semibold', 'Class' => 'leading-7', 'Attrs' => ui_attrs(['id', ui_add($v_id, '-title')])], 'children' => $c_1])|noescape}
{if ui_t(ui_get($v_action, ['label']))}
{capture $c_2}
{=ui_text(ui_get($v_action, ['label']))}
{/capture}
{=ui_include('ui/link/link.latte', ['p' => ['Href' => ui_s(ui_coalesce([ui_get($v_action, ['href']), '#/'])), 'Variant' => 'default', 'Class' => ui_s(ui_cnv([ui_preset('blocks/presets/defaults.json', ['text', 'tiny']), 'shrink-0 font-medium leading-5'])), 'Attrs' => ui_attrs(['data-testid', 'section-action'])], 'children' => $c_2])|noescape}
{/if}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Align' => 'center', 'Justify' => 'between', 'Class' => 'w-full'], 'children' => $c_3])|noescape}
{=ui_include('blocks/feature-cards.latte', ['p' => ['features' => $v_features, 'cols' => $v_cols, 'item' => $v_item]])|noescape}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'tone' => $v_tone, 'density' => $v_density, 'measure' => 'fill', 'className' => ui_cnv(['py-0']), 'landmarkLabel' => $v_landmarkLabel], 'children' => $c_4])|noescape}
{else}
{capture $c_5}
{if ui_t(ui_eq($v_layout, 'rows'))}
{=ui_include('blocks/feature-rows.latte', ['p' => ['features' => $v_features, 'mediaSide' => $v_mediaSide]])|noescape}
{else}
{=ui_include('blocks/feature-cards.latte', ['p' => ['features' => $v_features, 'cols' => $v_cols, 'item' => $v_item]])|noescape}
{/if}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'action' => $v_action, 'tone' => $v_tone, 'density' => $v_density, 'landmarkLabel' => $v_landmarkLabel], 'children' => $c_5])|noescape}
{/if}
{
"//": "Code generated by xgen. DO NOT EDIT.",
"specVersion": 1,
"id": "preset.defaults",
"name": "defaults",
"docs": "Default layout preset: the sizes of the landing blocks as Tailwind classes.\nBlocks combine these with token classes; swap the preset to resize every block at once.",
"source": "ui8kit default sizes (Tailwind scale, no arbitrary values)",
"notes": {
"text": "small type steps for chips, badges and links",
"hero.band": "the inverse band: tall section, large bottom radius",
"hero.title": "display title",
"hero.titleWeights": "one font-weight class per title word",
"hero.composer": "the prompt box",
"logos.row": "one centered row of logo slots",
"logos.glyph": "the Lucide glyph inside a slot: half the slot"
},
"values": {
"text": {
"tiny": "text-xs",
"small": "text-sm"
},
"hero": {
"band": "min-h-160 rounded",
"container": "max-w-7xl",
"head": "gap-12",
"badge": "w-48",
"title": "text-5xl leading-tight",
"titleWeights": [
"font-normal",
"font-semibold",
"font-normal",
"font-semibold"
],
"column": "max-w-xl gap-16",
"composer": "h-40 max-w-xl rounded",
"attach": "w-24",
"promptLine": "h-10",
"model": "w-24"
},
"section": {
"landing": "max-w-6xl"
},
"media": {
"rounded": "rounded"
},
"templates": {
"card": "h-60 w-64",
"image": "h-40 w-58 rounded",
"footer": "h-12 min-h-12"
},
"stats": {
"column": "min-h-28",
"figure": "h-12 text-4xl leading-12 md:h-18 md:text-6xl md:leading-18",
"panel": "gap-24 rounded py-20"
},
"features": {
"cells": "rounded"
},
"news": {
"card": "h-56 w-64",
"cover": "h-40 w-64 rounded",
"title": "top-16",
"strip": "h-12 min-h-12"
},
"cta": {
"panel": "rounded py-20",
"title": "max-w-md",
"text": "max-w-2xl",
"button": "w-40"
},
"logos": {
"row": "h-28 max-w-4xl gap-12 pb-8",
"slot": "size-20",
"glyph": 40
},
"footer": {
"card": "h-72 gap-12 rounded",
"brand": "w-48",
"groups": "gap-x-16"
}
}
}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-split.json
Features beside a picture. Axes: layout (grid: four plain features in two columns, cards: four features as cards and the actions, stats: two figure cards over three checked rows beside a square picture, metrics: four metric cards and the actions), mediaSide, tone.
Props (p): id, title, lead, badge, level, features, stats, actions, layout, mediaSide, tone, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_lead = ($p['lead'] ?? '')}
{var $v_badge = ($p['badge'] ?? '')}
{var $v_level = ($p['level'] ?? 2)}
{var $v_features = ($p['features'] ?? null)}
{var $v_stats = ($p['stats'] ?? null)}
{var $v_actions = ($p['actions'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'grid')}
{var $v_mediaSide = ($p['mediaSide'] ?? 'end')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $f_1}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => (ui_t(ui_eq($v_layout, 'stats')) ? '1/1' : '4/3')]])|noescape}
{/capture}
{capture $c_2}
{if ui_t(ui_eq($v_layout, 'grid'))}
{=ui_include('blocks/feature-pairs.latte', ['p' => ['features' => $v_features]])|noescape}
{/if}
{if ui_t(ui_eq($v_layout, 'cards'))}
{=ui_include('blocks/feature-cards.latte', ['p' => ['features' => $v_features, 'cols' => '1-2', 'item' => 'tile']])|noescape}
{/if}
{if ui_t(ui_eq($v_layout, 'stats'))}
{=ui_include('blocks/feature-stat-rows.latte', ['p' => ['features' => $v_features, 'stats' => $v_stats]])|noescape}
{/if}
{if ui_t(ui_eq($v_layout, 'metrics'))}
{=ui_include('blocks/feature-metric-cards.latte', ['p' => ['stats' => $v_stats]])|noescape}
{/if}
{if ui_t(ui_or([ui_eq($v_layout, 'cards'), ui_eq($v_layout, 'metrics')]))}
{=ui_include('blocks/action-group.latte', ['p' => ['primary' => ui_get($v_actions, ['cta']), 'primaryHref' => ui_get($v_actions, ['href']), 'secondary' => (ui_t(ui_eq(ui_get($v_actions, ['mode']), 'two')) ? ui_get($v_actions, ['secondary']) : null), 'secondaryHref' => ui_get($v_actions, ['secondaryHref'])]])|noescape}
{/if}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'heading' => ['badge' => $v_badge, 'level' => $v_level], 'tone' => $v_tone, 'layout' => 'split', 'media' => ['show' => true, 'side' => $v_mediaSide], 'landmarkLabel' => $v_landmarkLabel, 'aside' => $f_1], 'children' => $c_2])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-showcase.json
Features as cards under a centered heading. Axes: item (picture: a picture on top, then the title, the text and a read link; panel: a muted panel with a large glyph on top, then the title and the text), cols (3, 4), tone.
Props (p): id, title, lead, features, more, item, cols, tone, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_lead = ($p['lead'] ?? '')}
{var $v_features = ($p['features'] ?? null)}
{var $v_more = ($p['more'] ?? null)}
{var $v_item = ($p['item'] ?? 'picture')}
{var $v_cols = ($p['cols'] ?? '3')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_8}
{capture $c_7}
{foreach ui_l($v_features) as $v_f}
{capture $c_6}
{if ui_t(ui_eq($v_item, 'picture'))}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => ui_get($v_f, ['title'])]])|noescape}
{else}
{capture $c_1}
{=ui_include('ui/lucide-icon/lucide-icon.latte', ['p' => ['Name' => ui_s(ui_get($v_f, ['icon'])), 'Size' => 32]])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'flex aspect-video items-center justify-center rounded bg-muted text-foreground', 'Attrs' => ui_attrs(['data-testid', 'showcase-panel'])], 'children' => $c_1])|noescape}
{/if}
{capture $c_5}
{capture $c_2}
{=ui_text(ui_get($v_f, ['title']))}
{/capture}
{=ui_include('ui/title/title.latte', ['p' => ['As' => ui_i(3), 'Size' => 'base', 'Weight' => 'semibold'], 'children' => $c_2])|noescape}
{capture $c_3}
{=ui_text(ui_get($v_f, ['text']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Class' => 'text-muted-foreground'], 'children' => $c_3])|noescape}
{if ui_t(ui_eq($v_item, 'picture'))}
{capture $c_4}
{=ui_text($v_more)}
{=ui_include('ui/lucide-icon/lucide-icon.latte', ['p' => ['Name' => 'arrow-right', 'Size' => 16]])|noescape}
{/capture}
{=ui_include('ui/link/link.latte', ['p' => ['Href' => '#/', 'Size' => 'sm', 'Class' => 'mt-auto pt-2', 'Attrs' => ui_attrs(['data-testid', 'read'])], 'children' => $c_4])|noescape}
{/if}
{/capture}
{=ui_include('ui/card/card-content.latte', ['p' => ['Class' => 'flex flex-1 flex-col gap-2'], 'children' => $c_5])|noescape}
{/capture}
{=ui_include('ui/card/card.latte', ['p' => ['Variant' => 'default', 'Class' => 'h-full gap-4 overflow-hidden', 'Attrs' => ui_attrs(['data-testid', 'showcase-card'])], 'children' => $c_6])|noescape}
{/foreach}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => ui_s((ui_t(ui_eq($v_cols, '4')) ? 'grid grid-cols-1 gap-6 text-start sm:grid-cols-2 lg:grid-cols-4' : 'grid grid-cols-1 gap-6 text-start sm:grid-cols-2 lg:grid-cols-3'))], 'children' => $c_7])|noescape}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'tone' => $v_tone, 'align' => 'center', 'landmarkLabel' => $v_landmarkLabel], 'children' => $c_8])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/bento-grid.json
Tiles of different sizes in one grid: the large and wide tiles hold the important features. Sizes come from the data (large, wide, small). Axes: layout (bento, even: all tiles alike), media (none, image: a picture in the large tiles), tone, density.
Props (p): id, title, tiles, layout, media, tone, density, landmarkLabel. *}
{var $k_SPAN = ['large' => 'md:col-span-2 md:row-span-2', 'wide' => 'md:col-span-2', 'small' => '']}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_tiles = ($p['tiles'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'bento')}
{var $v_media = ($p['media'] ?? 'none')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_6}
{capture $c_5}
{foreach ui_l($v_tiles) as $v_tile}
{capture $c_4}
{capture $c_3}
{=ui_include('ui/lucide-icon/lucide-icon.latte', ['p' => ['Name' => ui_s(ui_get($v_tile, ['icon'])), 'Size' => 24]])|noescape}
{capture $c_1}
{=ui_text(ui_get($v_tile, ['title']))}
{/capture}
{=ui_include('ui/title/title.latte', ['p' => ['As' => ui_i(3), 'Size' => 'xl', 'Weight' => 'bold'], 'children' => $c_1])|noescape}
{capture $c_2}
{=ui_text(ui_get($v_tile, ['text']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Class' => 'text-muted-foreground'], 'children' => $c_2])|noescape}
{if ui_t(ui_and([ui_eq($v_media, 'image'), ui_or([ui_eq(ui_get($v_tile, ['size']), 'large'), ui_eq($v_layout, 'even')])]))}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => ui_get($v_tile, ['title']), 'ratio' => '4/3', 'className' => ui_cnv(['mt-auto'])]])|noescape}
{/if}
{/capture}
{=ui_include('ui/card/card-content.latte', ['p' => ['Class' => 'flex h-full flex-col gap-4'], 'children' => $c_3])|noescape}
{/capture}
{=ui_include('ui/card/card.latte', ['p' => ['Variant' => 'default', 'Class' => ui_s(ui_cnv(['h-full overflow-hidden', (ui_t(ui_eq($v_density, 'compact')) ? 'gap-4 p-4' : ''), (ui_t(ui_eq($v_layout, 'bento')) ? ui_at($k_SPAN, ui_get($v_tile, ['size'])) : '')])), 'Attrs' => ui_attrs(['data-testid', 'item', 'data-size', (ui_t(ui_eq($v_layout, 'bento')) ? ui_get($v_tile, ['size']) : 'even')])], 'children' => $c_4])|noescape}
{/foreach}
{/capture}
{=ui_include('ui/grid/grid.latte', ['p' => ['Cols' => '1-4', 'Class' => 'auto-rows-fr gap-4', 'Attrs' => ui_attrs(['data-testid', 'items'])], 'children' => $c_5])|noescape}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'tone' => $v_tone, 'density' => $v_density, 'landmarkLabel' => $v_landmarkLabel], 'children' => $c_6])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-tabs.json
Features behind a tab list: the chosen tab shows its text and a picture. The page keeps the chosen tab (`active`, empty for the first) and updates it on the `select` event. Axes: panel (split: text beside the picture, stack: picture below), tone, density.
Props (p): id, title, features, tabsLabel, active, panel, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_features = ($p['features'] ?? null)}
{var $v_tabsLabel = ($p['tabsLabel'] ?? null)}
{var $v_active = ($p['active'] ?? '')}
{var $v_panel = ($p['panel'] ?? 'split')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_8}
{capture $c_7}
{capture $c_2}
{foreach ui_l($v_features) as $v_f}
{var $v_i = $iterator->counter0}
{capture $c_1}
{=ui_text(ui_get($v_f, ['title']))}
{/capture}
{=ui_include('blocks/switcher-item.latte', ['p' => ['active' => ui_or([ui_eq(ui_get($v_f, ['id']), $v_active), ui_and([ui_eq($v_active, ''), ui_eq($v_i, 0)])])], 'children' => $c_1])|noescape}
{/foreach}
{/capture}
{=ui_include('blocks/switcher.latte', ['p' => ['label' => $v_tabsLabel, 'className' => ui_cnv(['w-fit max-w-full flex-wrap'])], 'children' => $c_2])|noescape}
{foreach ui_l($v_features) as $v_f}
{var $v_i = $iterator->counter0}
{if ui_t(ui_or([ui_eq(ui_get($v_f, ['id']), $v_active), ui_and([ui_eq($v_active, ''), ui_eq($v_i, 0)])]))}
{capture $c_6}
{capture $c_5}
{=ui_include('ui/lucide-icon/lucide-icon.latte', ['p' => ['Name' => ui_s(ui_get($v_f, ['icon'])), 'Size' => 24]])|noescape}
{capture $c_3}
{=ui_text(ui_get($v_f, ['title']))}
{/capture}
{=ui_include('ui/title/title.latte', ['p' => ['As' => ui_i(3), 'Size' => '2xl', 'Weight' => 'bold'], 'children' => $c_3])|noescape}
{capture $c_4}
{=ui_text(ui_get($v_f, ['text']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'base', 'Class' => 'text-muted-foreground'], 'children' => $c_4])|noescape}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '4'], 'children' => $c_5])|noescape}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => ui_get($v_f, ['title']), 'ratio' => '4/3']])|noescape}
{/capture}
{=ui_include('ui/grid/grid.latte', ['p' => ['Cols' => ui_s((ui_t(ui_eq($v_panel, 'split')) ? '1-2' : '1')), 'Class' => 'items-center gap-8', 'Attrs' => ui_attrs(['data-testid', 'tab-panel', 'role', 'tabpanel'])], 'children' => $c_6])|noescape}
{/if}
{/foreach}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '6', 'Align' => 'stretch'], 'children' => $c_7])|noescape}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'tone' => $v_tone, 'density' => $v_density, 'landmarkLabel' => $v_landmarkLabel], 'children' => $c_8])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/feature-accordion.json
Features as a list of disclosures: icon and title in the summary, the text when open. Axes: expand (first: the first one is open, none: all closed), media (none, image: a picture beside the list), tone, density.
Props (p): id, title, features, expand, media, multiple, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_features = ($p['features'] ?? null)}
{var $v_expand = ($p['expand'] ?? 'first')}
{var $v_media = ($p['media'] ?? 'none')}
{var $v_multiple = ($p['multiple'] ?? false)}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $f_7}
{=ui_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '4/3']])|noescape}
{/capture}
{capture $c_8}
{capture $c_6}
{foreach ui_l($v_features) as $v_f}
{var $v_i = $iterator->counter0}
{capture $c_5}
{capture $c_3}
{capture $c_2}
{=ui_include('ui/lucide-icon/lucide-icon.latte', ['p' => ['Name' => ui_s(ui_get($v_f, ['icon'])), 'Size' => 20]])|noescape}
{capture $c_1}
{=ui_text(ui_get($v_f, ['title']))}
{/capture}
{=ui_include('ui/inline/inline.latte', ['p' => ['Class' => 'text-base font-semibold'], 'children' => $c_1])|noescape}
{/capture}
{=ui_include('ui/inline/inline.latte', ['p' => ['Class' => 'flex min-w-0 items-center justify-start gap-4'], 'children' => $c_2])|noescape}
{/capture}
{=ui_include('ui/disclosure/summary.latte', ['p' => ['Variant' => 'item'], 'children' => $c_3])|noescape}
{capture $c_4}
{=ui_text(ui_get($v_f, ['text']))}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Class' => 'pb-4 text-muted-foreground'], 'children' => $c_4])|noescape}
{/capture}
{=ui_include('ui/disclosure/disclosure.latte', ['p' => ['Variant' => 'item', 'Name' => ui_s((ui_t($v_multiple) ? null : ui_tpl('{0}-accordion', [ui_coalesce([$v_id, 'accordion'])]))), 'Open' => ui_t(ui_and([ui_eq($v_expand, 'first'), ui_eq($v_i, 0)])), 'Attrs' => ui_attrs(['data-testid', 'item'])], 'children' => $c_5])|noescape}
{/foreach}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '0', 'Align' => 'stretch', 'Attrs' => ui_attrs(['data-testid', 'items'])], 'children' => $c_6])|noescape}
{/capture}
{=ui_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'tone' => $v_tone, 'density' => $v_density, 'layout' => (ui_t(ui_eq($v_media, 'image')) ? 'split' : 'stack'), 'media' => ['show' => ui_eq($v_media, 'image')], 'landmarkLabel' => $v_landmarkLabel, 'aside' => $f_7], 'children' => $c_8])|noescape}
{* Code generated by xgen. DO NOT EDIT.
Source: xgen/specs/organisms/sitemap-footer.json
A footer with the brand, a tagline, groups of links and the copyright. Axes: layout (columns: brand above, equal columns per group, row: the brand, the group names and the copyright in one row), signup mode (none, first: a sign-up above the links), status mode (none, show: a live status pill), density. The live status itself is a port contract.
Props (p): label, brand, tagline, copyright, groups, signup, status, id, layout, density, landmarkLabel. *}
{var $v_label = ($p['label'] ?? null)}
{var $v_brand = ($p['brand'] ?? null)}
{var $v_tagline = ($p['tagline'] ?? null)}
{var $v_copyright = ($p['copyright'] ?? null)}
{var $v_groups = ($p['groups'] ?? null)}
{var $v_signup = ($p['signup'] ?? null)}
{var $v_status = ($p['status'] ?? null)}
{var $v_id = ($p['id'] ?? 'footer')}
{var $v_layout = ($p['layout'] ?? 'columns')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{if ui_t(ui_eq($v_layout, 'card'))}
{=ui_include('blocks/footer-card.latte', ['p' => ['label' => $v_label, 'brand' => $v_brand, 'groups' => $v_groups, 'landmarkLabel' => $v_landmarkLabel]])|noescape}
{else}
{capture $c_21}
{capture $c_20}
{if ui_t(ui_eq(ui_get($v_signup, ['mode']), 'first'))}
{capture $c_6}
{capture $c_1}
{=ui_text(ui_get($v_signup, ['title']))}
{/capture}
{=ui_include('ui/title/title.latte', ['p' => ['As' => ui_i(3), 'Size' => 'xl', 'Weight' => 'bold'], 'children' => $c_1])|noescape}
{capture $c_5}
{capture $c_2}
{=ui_text(ui_get($v_signup, ['label']))}
{/capture}
{=ui_include('ui/label/label.latte', ['p' => ['HTMLFor' => ui_s(ui_tpl('{0}-email', [$v_id])), 'Class' => 'sr-only'], 'children' => $c_2])|noescape}
{capture $c_4}
{=ui_include('ui/input/input.latte', ['p' => ['Type' => 'email', 'Name' => 'email', 'Class' => 'min-w-0 flex-1', 'Attrs' => ui_attrs(['id', ui_tpl('{0}-email', [$v_id]), 'data-testid', 'field'])]])|noescape}
{capture $c_3}
{=ui_text(ui_get($v_signup, ['submit']))}
{/capture}
{=ui_include('ui/button/button.latte', ['p' => ['Variant' => 'default', 'Size' => 'default', 'Type' => 'submit', 'Attrs' => ui_attrs(['data-testid', 'submit'])], 'children' => $c_3])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '2', 'Align' => 'start', 'Class' => 'w-full flex-wrap'], 'children' => $c_4])|noescape}
{/capture}
{=ui_include('ui/form/form.latte', ['p' => ['Method' => 'dialog', 'Class' => ui_s(ui_cnv(['w-full max-w-md', (ui_t(false) ? 'mx-auto' : '')])), 'Attrs' => ui_attrs(['data-testid', 'email-form'])], 'children' => $c_5])|noescape}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '4', 'Class' => 'max-w-md', 'Attrs' => ui_attrs(['data-testid', 'signup'])], 'children' => $c_6])|noescape}
{/if}
{if ui_t(ui_eq($v_layout, 'columns'))}
{capture $c_11}
{capture $c_9}
{capture $c_7}
{=ui_text($v_brand)}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'xl', 'Weight' => 'bold'], 'children' => $c_7])|noescape}
{capture $c_8}
{=ui_text($v_tagline)}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Class' => 'text-muted-foreground'], 'children' => $c_8])|noescape}
{/capture}
{=ui_include('ui/stack/stack.latte', ['p' => ['Gap' => '2', 'Class' => 'md:w-64 md:shrink-0'], 'children' => $c_9])|noescape}
{capture $c_10}
{=ui_include('blocks/footer-columns.latte', ['p' => ['label' => $v_label, 'groups' => $v_groups, 'landmarkLabel' => $v_landmarkLabel]])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'min-w-0 flex-1'], 'children' => $c_10])|noescape}
{/capture}
{=ui_include('ui/box/box.latte', ['p' => ['Class' => 'flex flex-col gap-8 md:flex-row md:items-start md:gap-12', 'Attrs' => ui_attrs(['data-slot', 'footer-top'])], 'children' => $c_11])|noescape}
{else}
{capture $c_16}
{capture $c_12}
{=ui_text($v_brand)}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'base', 'Weight' => 'bold'], 'children' => $c_12])|noescape}
{capture $c_15}
{capture $c_14}
{foreach ui_l($v_groups) as $v_g}
{capture $c_13}
{=ui_text(ui_get($v_g, ['title']))}
{/capture}
{=ui_include('ui/link/link.latte', ['p' => ['Href' => '#/', 'Variant' => 'default', 'Class' => 'text-sm', 'Attrs' => ui_attrs(['data-testid', 'group'])], 'children' => $c_13])|noescape}
{/foreach}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Class' => 'flex-wrap'], 'children' => $c_14])|noescape}
{/capture}
{=ui_include('blocks/nav-block.latte', ['p' => ['label' => (ui_t($v_landmarkLabel) ? ui_uniq(ui_tpl('{0}, {1}', [$v_label, $v_landmarkLabel])) : $v_label)], 'children' => $c_15])|noescape}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '6', 'Align' => 'center', 'Justify' => 'between', 'Class' => 'flex-wrap'], 'children' => $c_16])|noescape}
{/if}
{capture $c_19}
{capture $c_17}
{=ui_text($v_copyright)}
{/capture}
{=ui_include('ui/text/text.latte', ['p' => ['Size' => 'sm', 'Class' => 'text-muted-foreground'], 'children' => $c_17])|noescape}
{if ui_t(ui_eq(ui_get($v_status, ['mode']), 'show'))}
{capture $c_18}
{=ui_text(ui_get($v_status, ['label']))}
{/capture}
{=ui_include('blocks/pill.latte', ['p' => ['tone' => 'green', 'icon' => 'circle-check'], 'children' => $c_18])|noescape}
{/if}
{/capture}
{=ui_include('ui/group/group.latte', ['p' => ['Gap' => '4', 'Align' => 'center', 'Justify' => 'between', 'Class' => 'flex-wrap border-t border-border pt-6'], 'children' => $c_19])|noescape}
{/capture}
{=ui_include('ui/container/container.latte', ['p' => ['Class' => ui_s(ui_cnv(['mx-auto w-full max-w-6xl px-4', 'flex flex-col gap-8', (ui_t(ui_eq($v_density, 'compact')) ? 'py-6' : 'py-12')])), 'Attrs' => ui_attrs(['data-slot', 'container'])], 'children' => $c_20])|noescape}
{/capture}
{=ui_include('ui/block/block.latte', ['p' => ['Tag' => 'footer', 'Class' => 'mt-12 border-t border-border', 'Attrs' => ui_attrs(['data-testid', 'site-footer', 'data-layout', $v_layout, 'aria-label', $v_landmarkLabel])], 'children' => $c_21])|noescape}
{/if}