About Company
The culture: a strip of pictures, figures and values.
Install
npx ui8kit add about-companyPulls in: box, compose, feature-grid, grid, group, kit-box, kit-text, lucide-icon, media-frame, section-frame, stack, stats-band, text, utils
Preview
How we work
A few numbers and the three rules we hire and plan by.
12,400
Sites published
99.99%
Uptime
3,200
Teams
0.8s
Median load
Craft over speed
We ship when it is right, then we ship often.
Work in the open
Plans, notes and numbers are shared with the whole team.
Care for the reader
Every page is written for the person who has to use it.
Code
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework svelte --dir src --registry-url https://registry.buildy.tw/svelte --strict-cdnnpx ui8kit add about-company<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
The culture of a company: a strip of three pictures, the heading, a few figures and the values. Axes: layout
(split: the pictures beside the text, stacked: the pictures under it), tone, density.
-->
<script lang="ts" module>
import type { Snippet } from "svelte";
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type AboutCompanyProps = {
id: string;
title: string;
lead?: string;
stats: Stat[];
values: Feature[];
layout?: "split" | "stacked";
tone?: "default" | "muted";
density?: "default" | "compact";
landmarkLabel?: string;
};
</script>
<script lang="ts">
import Box from "../compose/Box.svelte";
import Grid from "../compose/Grid.svelte";
import Group from "../compose/Group.svelte";
import LucideIcon from "../icons/LucideIcon.svelte";
import Stack from "../compose/Stack.svelte";
import Text from "../compose/Text.svelte";
import MediaFrame from "../components/media-frame.svelte";
import SectionFrame from "../components/section-frame.svelte";
import { cn } from "../utils";
let {
id,
title,
lead = "",
stats,
values,
layout = "split",
tone = "default",
density = "default",
landmarkLabel,
}: AboutCompanyProps = $props();
</script>
<SectionFrame
id={id}
title={title}
lead={lead}
tone={tone}
density={density}
layout={(((layout as string) === "split") ? "split" : "stack")}
media={{ show: true, side: "start" }}
landmarkLabel={landmarkLabel}
>
{#if ((stats?.length ?? 0) > 0)}
<Grid cols="2-4" class="gap-4" data-slot="stats">
{#each stats as s (s.id)}
<Stack gap="0" data-slot="stat">
<Text size="3xl" weight="bold">
{s.value}
</Text>
<Text size="xs" class="text-muted-foreground">
{s.label}
</Text>
</Stack>
{/each}
</Grid>
{/if}
{#if ((values?.length ?? 0) > 0)}
<Box
class={cn("grid grid-cols-1 gap-4", (((layout as string) === "stacked") ? "md:grid-cols-3" : ""))}
data-slot="values"
>
{#each values as v (v.id)}
<Group gap="4" align="start" class="border-t border-border pt-4" data-slot="value">
<LucideIcon name={v.icon} size={20} />
<Stack gap="2">
<Text size="sm" weight="semibold">
{v.title}
</Text>
<Text size="sm" class="text-muted-foreground">
{v.text}
</Text>
</Stack>
</Group>
{/each}
</Box>
{/if}
{#snippet aside()}
<Box class="grid grid-cols-3 gap-4" data-slot="strip">
<MediaFrame alt={title} ratio="3/4" />
<MediaFrame alt={title} ratio="3/4" class="mt-8" />
<MediaFrame alt={title} ratio="3/4" />
</Box>
{/snippet}
</SectionFrame>
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework react --dir src --registry-url https://registry.buildy.tw/react --strict-cdnnpx ui8kit add about-company// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* The culture of a company: a strip of three pictures, the heading, a few figures and the values. Axes: layout
* (split: the pictures beside the text, stacked: the pictures under it), tone, density.
*/
import { type ReactNode } from "react";
import { Box, Grid, Group, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { MediaFrame } from "../components/media-frame";
import { SectionFrame } from "../components/section-frame";
import { cn } from "../utils";
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type AboutCompanyProps = {
id: string;
title: string;
lead?: string;
stats: Stat[];
values: Feature[];
layout?: "split" | "stacked";
tone?: "default" | "muted";
density?: "default" | "compact";
landmarkLabel?: string;
};
export function AboutCompany({
id,
title,
lead = "",
stats,
values,
layout = "split",
tone = "default",
density = "default",
landmarkLabel,
}: AboutCompanyProps) {
return (
<SectionFrame
id={id}
title={title}
lead={lead}
tone={tone}
density={density}
layout={(((layout as string) === "split") ? "split" : "stack")}
media={{ show: true, side: "start" }}
landmarkLabel={landmarkLabel}
aside={(
<Box className="grid grid-cols-3 gap-4" data-slot="strip">
<MediaFrame alt={title} ratio="3/4" />
<MediaFrame alt={title} ratio="3/4" className="mt-8" />
<MediaFrame alt={title} ratio="3/4" />
</Box>
)}
>
{((stats?.length ?? 0) > 0) ? (
<Grid cols="2-4" className="gap-4" data-slot="stats">
{(stats ?? []).map((s) => (
<Stack key={s.id} gap="0" data-slot="stat">
<Text size="3xl" weight="bold">
{s.value}
</Text>
<Text size="xs" className="text-muted-foreground">
{s.label}
</Text>
</Stack>
))}
</Grid>
) : null}
{((values?.length ?? 0) > 0) ? (
<Box
className={cn(
"grid grid-cols-1 gap-4",
(((layout as string) === "stacked") ? "md:grid-cols-3" : "")
)}
data-slot="values"
>
{(values ?? []).map((v) => (
<Group key={v.id} gap="4" align="start" className="border-t border-border pt-4" data-slot="value">
<LucideIcon name={v.icon} size={20} />
<Stack gap="2">
<Text size="sm" weight="semibold">
{v.title}
</Text>
<Text size="sm" className="text-muted-foreground">
{v.text}
</Text>
</Stack>
</Group>
))}
</Box>
) : null}
</SectionFrame>
);
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework vue --dir src --registry-url https://registry.buildy.tw/vue --strict-cdnnpx ui8kit add about-company<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
The culture of a company: a strip of three pictures, the heading, a few figures and the values. Axes: layout
(split: the pictures beside the text, stacked: the pictures under it), tone, density.
-->
<script lang="ts">
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type AboutCompanyProps = {
id: string;
title: string;
lead?: string;
stats: Stat[];
values: Feature[];
layout?: "split" | "stacked";
tone?: "default" | "muted";
density?: "default" | "compact";
landmarkLabel?: string;
};
</script>
<script setup lang="ts">
import Box from "../compose/Box.vue";
import Grid from "../compose/Grid.vue";
import Group from "../compose/Group.vue";
import LucideIcon from "../icons/LucideIcon.vue";
import Stack from "../compose/Stack.vue";
import Text from "../compose/Text.vue";
import MediaFrame from "../components/media-frame.vue";
import SectionFrame from "../components/section-frame.vue";
import { cn } from "../utils";
const {
id,
title,
lead = "",
stats,
values,
layout = "split",
tone = "default",
density = "default",
landmarkLabel,
} = defineProps<AboutCompanyProps>();
</script>
<template>
<SectionFrame
:id="id"
:title="title"
:lead="lead"
:tone="tone"
:density="density"
:layout="(((layout as string) === 'split') ? 'split' : 'stack')"
:media="{ show: true, side: 'start' }"
:landmarkLabel="landmarkLabel"
>
<Grid v-if="((stats?.length ?? 0) > 0)" cols="2-4" class="gap-4" data-slot="stats">
<Stack v-for="s in stats" :key="s.id" gap="0" data-slot="stat">
<Text size="3xl" weight="bold">
{{ s.value }}
</Text>
<Text size="xs" class="text-muted-foreground">
{{ s.label }}
</Text>
</Stack>
</Grid>
<Box v-if="((values?.length ?? 0) > 0)"
:class="cn('grid grid-cols-1 gap-4', (((layout as string) === 'stacked') ? 'md:grid-cols-3' : ''))"
data-slot="values"
>
<Group
v-for="v in values"
:key="v.id"
gap="4"
align="start"
class="border-t border-border pt-4"
data-slot="value"
>
<LucideIcon :name="v.icon" :size="20" />
<Stack gap="2">
<Text size="sm" weight="semibold">
{{ v.title }}
</Text>
<Text size="sm" class="text-muted-foreground">
{{ v.text }}
</Text>
</Stack>
</Group>
</Box>
<template #aside>
<Box class="grid grid-cols-3 gap-4" data-slot="strip">
<MediaFrame :alt="title" ratio="3/4" />
<MediaFrame :alt="title" ratio="3/4" class="mt-8" />
<MediaFrame :alt="title" ratio="3/4" />
</Box>
</template>
</SectionFrame>
</template>
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework solid --dir src --registry-url https://registry.buildy.tw/solid --strict-cdnnpx ui8kit add about-company// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* The culture of a company: a strip of three pictures, the heading, a few figures and the values. Axes: layout
* (split: the pictures beside the text, stacked: the pictures under it), tone, density.
*/
import { For, type JSX } from "solid-js";
import { Box, Grid, Group, Stack, Text } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { MediaFrame } from "../components/media-frame";
import { SectionFrame } from "../components/section-frame";
import { cn } from "../utils";
import type { Stat } from "./stats-band.types";
import type { Feature } from "./feature-grid.types";
export type AboutCompanyProps = {
id: string;
title: string;
lead?: string;
stats: Stat[];
values: Feature[];
layout?: "split" | "stacked";
tone?: "default" | "muted";
density?: "default" | "compact";
landmarkLabel?: string;
};
export function AboutCompany({
id,
title,
lead = "",
stats,
values,
layout = "split",
tone = "default",
density = "default",
landmarkLabel,
}: AboutCompanyProps) {
return (
<SectionFrame
id={id}
title={title}
lead={lead}
tone={tone}
density={density}
layout={(((layout as string) === "split") ? "split" : "stack")}
media={{ show: true, side: "start" }}
landmarkLabel={landmarkLabel}
aside={(
<Box class="grid grid-cols-3 gap-4" data-slot="strip">
<MediaFrame alt={title} ratio="3/4" />
<MediaFrame alt={title} ratio="3/4" class="mt-8" />
<MediaFrame alt={title} ratio="3/4" />
</Box>
)}
>
{((stats?.length ?? 0) > 0) ? (
<Grid cols="2-4" class="gap-4" data-slot="stats">
<For each={stats ?? []}>{(s) => (
<Stack gap="0" data-slot="stat">
<Text size="3xl" weight="bold">
{s.value}
</Text>
<Text size="xs" class="text-muted-foreground">
{s.label}
</Text>
</Stack>
)}</For>
</Grid>
) : null}
{((values?.length ?? 0) > 0) ? (
<Box
class={cn("grid grid-cols-1 gap-4", (((layout as string) === "stacked") ? "md:grid-cols-3" : ""))}
data-slot="values"
>
<For each={values ?? []}>{(v) => (
<Group gap="4" align="start" class="border-t border-border pt-4" data-slot="value">
<LucideIcon name={v.icon} size={20} />
<Stack gap="2">
<Text size="sm" weight="semibold">
{v.title}
</Text>
<Text size="sm" class="text-muted-foreground">
{v.text}
</Text>
</Stack>
</Group>
)}</For>
</Box>
) : null}
</SectionFrame>
);
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework templ --dir src --registry-url https://registry.buildy.tw/templ --strict-cdnnpx ui8kit add about-company// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
// Source: packages/compose-gen/specs/organisms/about-company.json
package blocks
import (
"github.com/ui8kit/codegen/generated/templ/ui/box"
"github.com/ui8kit/codegen/generated/templ/compose"
"github.com/ui8kit/codegen/generated/templ/icons"
"github.com/ui8kit/codegen/generated/templ/ui/text"
uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)
// AboutCompanyProps are the props of AboutCompany; the values are the JSON shapes of the TypeScript props.
type AboutCompanyProps struct {
Id any `json:"id"`
Title any `json:"title"`
Lead any `json:"lead"`
Stats any `json:"stats"`
Values any `json:"values"`
Layout any `json:"layout"`
Tone any `json:"tone"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// The culture of a company: a strip of three pictures, the heading, a few figures and the values. Axes: layout (split: the pictures beside the text, stacked: the pictures under it), tone, density.
templ AboutCompany(p AboutCompanyProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vLead := uiutils.Def(p.Lead, "") }}
{{ vStats := p.Stats }}
{{ vValues := p.Values }}
{{ vLayout := uiutils.Def(p.Layout, "split") }}
{{ vTone := uiutils.Def(p.Tone, "default") }}
{{ vDensity := uiutils.Def(p.Density, "default") }}
{{ vLandmarkLabel := p.LandmarkLabel }}
@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, Density: vDensity, Layout: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "split")), "split", "stack"), Media: map[string]any{"show": true, "side": "start"}, LandmarkLabel: vLandmarkLabel, Aside: aboutCompanyFill1(p, vTitle)}) {
if uiutils.Gt(uiutils.Len(vStats), float64(0)) {
@compose.Grid(compose.GridProps{Cols: "2-4", BoxProps: box.BoxProps{Class: "gap-4", Attrs: uiutils.Attrs("data-slot", "stats")}}) {
for _, vS := range uiutils.L(vStats) {
@compose.Stack(compose.StackProps{Gap: "0", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "stat")}}) {
@compose.Text(compose.TextProps{Size: "3xl", Weight: "bold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vS, "value")) }
}
@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vS, "label")) }
}
}
}
}
}
if uiutils.Gt(uiutils.Len(vValues), float64(0)) {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("grid grid-cols-1 gap-4", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "stacked")), "md:grid-cols-3", ""))), Attrs: uiutils.Attrs("data-slot", "values")}}) {
for _, vV := range uiutils.L(vValues) {
@compose.Group(compose.GroupProps{Gap: "4", Align: "start", BoxProps: box.BoxProps{Class: "border-t border-border pt-4", Attrs: uiutils.Attrs("data-slot", "value")}}) {
@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vV, "icon")), Size: 20})
@compose.Stack(compose.StackProps{Gap: "2", BoxProps: box.BoxProps{}}) {
@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vV, "title")) }
}
@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vV, "text")) }
}
}
}
}
}
}
}
}
templ aboutCompanyFill1(p AboutCompanyProps, vTitle any) {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "grid grid-cols-3 gap-4", Attrs: uiutils.Attrs("data-slot", "strip")}}) {
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "3/4"})
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "3/4", Class: uiutils.Cnv("mt-8")})
@MediaFrame(MediaFrameProps{Alt: vTitle, Ratio: "3/4"})
}
}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework twig --dir src --registry-url https://registry.buildy.tw/twig --strict-cdnnpx ui8kit add about-company{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/organisms/about-company.json
The culture of a company: a strip of three pictures, the heading, a few figures and the values. Axes: layout (split: the pictures beside the text, stacked: the pictures under it), tone, density.
Props (p): id, title, lead, stats, values, layout, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_lead = (p.lead ?? '') -%}
{%- set v_stats = (p.stats ?? null) -%}
{%- set v_values = (p.values ?? null) -%}
{%- set v_layout = (p.layout ?? 'split') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set f_10 -%}
{%- set c_11 -%}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '3/4'}}, with_context = false) }}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '3/4', 'className': og_cnv(['mt-8'])}}, with_context = false) }}
{{ include('blocks/media-frame.html.twig', {'p': {'alt': v_title, 'ratio': '3/4'}}, with_context = false) }}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'grid grid-cols-3 gap-4', 'attrs': og_attrs(['data-slot', 'strip']), 'children': c_11}, with_context = false) }}
{%- endset -%}
{%- set c_12 -%}
{%- if og_t(og_gt(og_len(v_stats), 0)) %}
{%- set c_4 -%}
{%- for v_s in og_l(v_stats) %}
{%- set c_3 -%}
{%- set c_1 -%}
{{ og_text(og_get(v_s, ['value'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': '3xl', 'weight': 'bold', 'children': c_1}, with_context = false) }}
{%- set c_2 -%}
{{ og_text(og_get(v_s, ['label'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '0', 'attrs': og_attrs(['data-slot', 'stat']), 'children': c_3}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('compose/Grid.html.twig', {'cols': '2-4', 'class': 'gap-4', 'attrs': og_attrs(['data-slot', 'stats']), 'children': c_4}, with_context = false) }}
{%- endif %}
{%- if og_t(og_gt(og_len(v_values), 0)) %}
{%- set c_9 -%}
{%- for v_v in og_l(v_values) %}
{%- set c_8 -%}
{{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_v, ['icon'])), 'size': 20}, with_context = false) }}
{%- set c_7 -%}
{%- set c_5 -%}
{{ og_text(og_get(v_v, ['title'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_5}, with_context = false) }}
{%- set c_6 -%}
{{ og_text(og_get(v_v, ['text'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_6}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '2', 'children': c_7}, with_context = false) }}
{%- endset -%}
{{ include('compose/Group.html.twig', {'gap': '4', 'align': 'start', 'class': 'border-t border-border pt-4', 'attrs': og_attrs(['data-slot', 'value']), 'children': c_8}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['grid grid-cols-1 gap-4', (og_t(og_eq(v_layout, 'stacked')) ? 'md:grid-cols-3' : '')])), 'attrs': og_attrs(['data-slot', 'values']), 'children': c_9}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'density': v_density, 'layout': (og_t(og_eq(v_layout, 'split')) ? 'split' : 'stack'), 'media': {'show': true, 'side': 'start'}, 'landmarkLabel': v_landmarkLabel, 'aside': og_markup(f_10)}, 'children': og_markup(c_12)}, with_context = false) }}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework latte --dir src --registry-url https://registry.buildy.tw/latte --strict-cdnnpx ui8kit add about-company{* Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/organisms/about-company.json
The culture of a company: a strip of three pictures, the heading, a few figures and the values. Axes: layout (split: the pictures beside the text, stacked: the pictures under it), tone, density.
Props (p): id, title, lead, stats, values, layout, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_lead = ($p['lead'] ?? '')}
{var $v_stats = ($p['stats'] ?? null)}
{var $v_values = ($p['values'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'split')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $f_10}
{capture $c_11}
{=og_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '3/4']])|noescape}
{=og_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '3/4', 'className' => og_cnv(['mt-8'])]])|noescape}
{=og_include('blocks/media-frame.latte', ['p' => ['alt' => $v_title, 'ratio' => '3/4']])|noescape}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'grid grid-cols-3 gap-4', 'attrs' => og_attrs(['data-slot', 'strip']), 'children' => (string) $c_11])|noescape}
{/capture}
{capture $c_12}
{if og_t(og_gt(og_len($v_stats), 0))}
{capture $c_4}
{foreach og_l($v_stats) as $v_s}
{capture $c_3}
{capture $c_1}
{=og_text(og_get($v_s, ['value']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => '3xl', 'weight' => 'bold', 'children' => (string) $c_1])|noescape}
{capture $c_2}
{=og_text(og_get($v_s, ['label']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_2])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '0', 'attrs' => og_attrs(['data-slot', 'stat']), 'children' => (string) $c_3])|noescape}
{/foreach}
{/capture}
{=og_include('compose/Grid.latte', ['cols' => '2-4', 'class' => 'gap-4', 'attrs' => og_attrs(['data-slot', 'stats']), 'children' => (string) $c_4])|noescape}
{/if}
{if og_t(og_gt(og_len($v_values), 0))}
{capture $c_9}
{foreach og_l($v_values) as $v_v}
{capture $c_8}
{=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_v, ['icon'])), 'size' => 20])|noescape}
{capture $c_7}
{capture $c_5}
{=og_text(og_get($v_v, ['title']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_5])|noescape}
{capture $c_6}
{=og_text(og_get($v_v, ['text']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_6])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '2', 'children' => (string) $c_7])|noescape}
{/capture}
{=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'start', 'class' => 'border-t border-border pt-4', 'attrs' => og_attrs(['data-slot', 'value']), 'children' => (string) $c_8])|noescape}
{/foreach}
{/capture}
{=og_include('compose/Box.latte', ['class' => og_s(og_cnv(['grid grid-cols-1 gap-4', (og_t(og_eq($v_layout, 'stacked')) ? 'md:grid-cols-3' : '')])), 'attrs' => og_attrs(['data-slot', 'values']), 'children' => (string) $c_9])|noescape}
{/if}
{/capture}
{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'tone' => $v_tone, 'density' => $v_density, 'layout' => (og_t(og_eq($v_layout, 'split')) ? 'split' : 'stack'), 'media' => ['show' => true, 'side' => 'start'], 'landmarkLabel' => $v_landmarkLabel, 'aside' => og_markup($f_10)], 'children' => og_markup($c_12)])|noescape}
Point the CLI at this runtime once, then add the item:
npx ui8kit init --yes --framework jinja2 --dir src --registry-url https://registry.buildy.tw/jinja2 --strict-cdnnpx ui8kit add about-company{#- Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
Source: packages/compose-gen/specs/organisms/about-company.json
The culture of a company: a strip of three pictures, the heading, a few figures and the values. Axes: layout (split: the pictures beside the text, stacked: the pictures under it), tone, density.
Props (p): id, title, lead, stats, values, layout, tone, density, landmarkLabel. -#}
{%- set v_id = og_def(p['id'], none) -%}
{%- set v_title = og_def(p['title'], none) -%}
{%- set v_lead = og_def(p['lead'], '') -%}
{%- set v_stats = og_def(p['stats'], none) -%}
{%- set v_values = og_def(p['values'], none) -%}
{%- set v_layout = og_def(p['layout'], 'split') -%}
{%- set v_tone = og_def(p['tone'], 'default') -%}
{%- set v_density = og_def(p['density'], 'default') -%}
{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}
{%- set f_10 -%}
{%- set c_11 -%}
{{ og_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '3/4'}}) }}
{{ og_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '3/4', 'className': og_cnv(['mt-8'])}}) }}
{{ og_include('blocks/media-frame.html.j2', {'p': {'alt': v_title, 'ratio': '3/4'}}) }}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'grid grid-cols-3 gap-4', 'Attrs': og_attrs(['data-slot', 'strip'])}, 'children': c_11}) }}
{%- endset -%}
{%- set c_12 -%}
{%- if og_t(og_gt(og_len(v_stats), 0)) %}
{%- set c_4 -%}
{%- for v_s in og_l(v_stats) %}
{%- set c_3 -%}
{%- set c_1 -%}
{{ og_text(og_get(v_s, ['value'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': '3xl', 'Weight': 'bold'}, 'children': c_1}) }}
{%- set c_2 -%}
{{ og_text(og_get(v_s, ['label'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '0', 'Attrs': og_attrs(['data-slot', 'stat'])}, 'children': c_3}) }}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/grid.html.j2', {'p': {'Cols': '2-4', 'Class': 'gap-4', 'Attrs': og_attrs(['data-slot', 'stats'])}, 'children': c_4}) }}
{%- endif %}
{%- if og_t(og_gt(og_len(v_values), 0)) %}
{%- set c_9 -%}
{%- for v_v in og_l(v_values) %}
{%- set c_8 -%}
{{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_v, ['icon'])), 'Size': 20}}) }}
{%- set c_7 -%}
{%- set c_5 -%}
{{ og_text(og_get(v_v, ['title'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_5}) }}
{%- set c_6 -%}
{{ og_text(og_get(v_v, ['text'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_6}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '2'}, 'children': c_7}) }}
{%- endset -%}
{{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Align': 'start', 'Class': 'border-t border-border pt-4', 'Attrs': og_attrs(['data-slot', 'value'])}, 'children': c_8}) }}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': og_s(og_cnv(['grid grid-cols-1 gap-4', ('md:grid-cols-3' if og_t(og_eq(v_layout, 'stacked')) else '')])), 'Attrs': og_attrs(['data-slot', 'values'])}, 'children': c_9}) }}
{%- endif %}
{%- endset -%}
{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'tone': v_tone, 'density': v_density, 'layout': ('split' if og_t(og_eq(v_layout, 'split')) else 'stack'), 'media': {'show': true, 'side': 'start'}, 'landmarkLabel': v_landmarkLabel, 'aside': og_markup(f_10)}, 'children': og_markup(c_12)}) }}
Props
Names and types come from the xgen specs of the source. Standard HTML attributes (id, role, tabIndex, aria-*) pass through to the root element; the class prop is className in React.
The culture of a company: a strip of three pictures, the heading, a few figures and the values. Axes: layout (split: the pictures beside the text, stacked: the pictures under it), tone, density.
| Prop | Type | Default | Description |
|---|---|---|---|
| id (required) | string | - | |
| title (required) | string | - | |
| lead | string | "" | |
| stats (required) | Stat[] | - | |
| values (required) | Feature[] | - | |
| layout | "split" | "stacked" | "split" | |
| tone | "default" | "muted" | "default" | |
| density | "default" | "compact" | "default" | |
| landmarkLabel | string | - | accessible name of the landmark of this component when the page shows it more than once (a variant); replaces the heading name of the root landmark, follows the name of a nested one |