Skip to content
ui8kit

block / marketing

About Me

A personal about section beside a portrait: key facts or skills.

Install

npx ui8kit add about-me

Pulls in: action-group, compose, error-page, group, kit-box, kit-progress, kit-text, list, list-item, media-frame, product-info, progress, section-frame, stack, text, utils

Preview

Available for projects

Hi, I design calm software

Nine years of product design for teams that ship every week. I like systems, plain words and short feedback loops.

  • Role

    Product designer

  • Based in

    Lisbon

  • Experience

    9 years

  • Status

    Open to projects

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-cdn
npx ui8kit add about-me
blocks/about-me.svelte
<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
  A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of
  specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills),
  mediaSide, tone.
-->
<script lang="ts" module>
  import type { Snippet } from "svelte";
  import type { Skill, AboutMeLabels } from "./about-me.types";
  import type { Spec } from "./product-info.types";
  import type { LinkActions } from "./error-page.types";

  export type AboutMeProps = {
    id: string;
    title: string;
    lead?: string;
    badge?: string;
    level?: 1 | 2;
    facts: Spec[];
    skills: Skill[];
    labels: AboutMeLabels;
    actions: LinkActions;
    layout?: "facts" | "skills";
    mediaSide?: "start" | "end";
    tone?: "default" | "muted";
    image?: string;
    imageAlt?: string;
    landmarkLabel?: string;
  };
</script>

<script lang="ts">
  import Group from "../compose/Group.svelte";
  import List from "../compose/List.svelte";
  import ListItem from "../compose/ListItem.svelte";
  import Progress from "../compose/Progress.svelte";
  import Stack from "../compose/Stack.svelte";
  import Text from "../compose/Text.svelte";
  import ActionGroup from "../components/action-group.svelte";
  import MediaFrame from "../components/media-frame.svelte";
  import SectionFrame from "../components/section-frame.svelte";
  import { tpl } from "../utils";

  let {
    id,
    title,
    lead = "",
    badge = "",
    level = 1,
    facts,
    skills,
    labels,
    actions,
    layout = "facts",
    mediaSide = "start",
    tone = "default",
    image,
    imageAlt,
    landmarkLabel,
  }: AboutMeProps = $props();
</script>

<SectionFrame
  id={id}
  title={title}
  lead={lead}
  heading={{ badge, level }}
  layout="split"
  media={{ show: true, side: mediaSide }}
  tone={tone}
  landmarkLabel={landmarkLabel}
>
  {#if ((layout as string) === "facts")}
    {#if ((facts?.length ?? 0) > 0)}
      <List tag="ul" class="grid grid-cols-1 gap-4 sm:grid-cols-2" data-slot="facts">
        {#each facts as f (f.id)}
          <ListItem class="rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4" data-slot="fact">
            <Text size="xs" class="text-muted-foreground">
              {f.label}
            </Text>
            <Text size="sm" weight="semibold">
              {f.value}
            </Text>
          </ListItem>
        {/each}
      </List>
    {/if}
  {:else if ((skills?.length ?? 0) > 0)}
    <Stack gap="4" align="stretch" data-slot="skills">
      {#each skills as s (s.id)}
        <Stack gap="2" align="stretch" data-slot="skill">
          <Group gap="4" justify="between">
            <Text size="sm" weight="semibold">
              {s.label}
            </Text>
            <Text size="xs" class="text-muted-foreground">
              {tpl(labels.level, s.level)}
            </Text>
          </Group>
          <Progress value={(s.level == null ? undefined : String(s.level))} max="100" aria-label={s.label} />
        </Stack>
      {/each}
    </Stack>
  {/if}
  <ActionGroup
    primary={actions.cta}
    primaryHref={actions.href}
    secondary={((actions.mode === "two") ? actions.secondary : undefined)}
    secondaryHref={actions.secondaryHref}
  />
  {#snippet aside()}
    <MediaFrame alt={(imageAlt ? imageAlt : title)} src={image} ratio="3/4" />
  {/snippet}
</SectionFrame>
blocks/about-me.types.ts
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.

export type Skill = {
  id: string;
  label: string;
  level: number;
};

export type AboutMeLabels = {
  level: string;
};

Svelte registry item (JSON)

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-cdn
npx ui8kit add about-me
blocks/about-me.tsx
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
 * A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of
 * specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills),
 * mediaSide, tone.
 */
import { type ReactNode } from "react";
import { Group, List, ListItem, Progress, Stack, Text } from "../compose";
import { ActionGroup } from "../components/action-group";
import { MediaFrame } from "../components/media-frame";
import { SectionFrame } from "../components/section-frame";
import { tpl } from "../utils";
import type { Skill, AboutMeLabels } from "./about-me.types";
import type { Spec } from "./product-info.types";
import type { LinkActions } from "./error-page.types";

export type AboutMeProps = {
  id: string;
  title: string;
  lead?: string;
  badge?: string;
  level?: 1 | 2;
  facts: Spec[];
  skills: Skill[];
  labels: AboutMeLabels;
  actions: LinkActions;
  layout?: "facts" | "skills";
  mediaSide?: "start" | "end";
  tone?: "default" | "muted";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};

export function AboutMe({
  id,
  title,
  lead = "",
  badge = "",
  level = 1,
  facts,
  skills,
  labels,
  actions,
  layout = "facts",
  mediaSide = "start",
  tone = "default",
  image,
  imageAlt,
  landmarkLabel,
}: AboutMeProps) {
  return (
    <SectionFrame
      id={id}
      title={title}
      lead={lead}
      heading={{ badge, level }}
      layout="split"
      media={{ show: true, side: mediaSide }}
      tone={tone}
      landmarkLabel={landmarkLabel}
      aside={(
        <MediaFrame alt={(imageAlt ? imageAlt : title)} src={image} ratio="3/4" />
      )}
    >
      {((layout as string) === "facts") ? (
        <>
          {((facts?.length ?? 0) > 0) ? (
            <List tag="ul" className="grid grid-cols-1 gap-4 sm:grid-cols-2" data-slot="facts">
              {(facts ?? []).map((f) => (
                <ListItem key={f.id} className="rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4" data-slot="fact">
                  <Text size="xs" className="text-muted-foreground">
                    {f.label}
                  </Text>
                  <Text size="sm" weight="semibold">
                    {f.value}
                  </Text>
                </ListItem>
              ))}
            </List>
          ) : null}
        </>
      ) : ((skills?.length ?? 0) > 0) ? (
        <Stack gap="4" align="stretch" data-slot="skills">
          {(skills ?? []).map((s) => (
            <Stack key={s.id} gap="2" align="stretch" data-slot="skill">
              <Group gap="4" justify="between">
                <Text size="sm" weight="semibold">
                  {s.label}
                </Text>
                <Text size="xs" className="text-muted-foreground">
                  {tpl(labels.level, s.level)}
                </Text>
              </Group>
              <Progress value={(s.level == null ? undefined : String(s.level))} max="100" aria-label={s.label} />
            </Stack>
          ))}
        </Stack>
      ) : null}
      <ActionGroup
        primary={actions.cta}
        primaryHref={actions.href}
        secondary={((actions.mode === "two") ? actions.secondary : undefined)}
        secondaryHref={actions.secondaryHref}
      />
    </SectionFrame>
  );
}
blocks/about-me.types.ts
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.

export type Skill = {
  id: string;
  label: string;
  level: number;
};

export type AboutMeLabels = {
  level: string;
};

React registry item (JSON)

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-cdn
npx ui8kit add about-me
blocks/about-me.types.ts
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.

export type Skill = {
  id: string;
  label: string;
  level: number;
};

export type AboutMeLabels = {
  level: string;
};
blocks/about-me.vue
<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
  A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of
  specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills),
  mediaSide, tone.
-->
<script lang="ts">
import type { Skill, AboutMeLabels } from "./about-me.types";
import type { Spec } from "./product-info.types";
import type { LinkActions } from "./error-page.types";

export type AboutMeProps = {
  id: string;
  title: string;
  lead?: string;
  badge?: string;
  level?: 1 | 2;
  facts: Spec[];
  skills: Skill[];
  labels: AboutMeLabels;
  actions: LinkActions;
  layout?: "facts" | "skills";
  mediaSide?: "start" | "end";
  tone?: "default" | "muted";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};
</script>

<script setup lang="ts">
import Group from "../compose/Group.vue";
import List from "../compose/List.vue";
import ListItem from "../compose/ListItem.vue";
import Progress from "../compose/Progress.vue";
import Stack from "../compose/Stack.vue";
import Text from "../compose/Text.vue";
import ActionGroup from "../components/action-group.vue";
import MediaFrame from "../components/media-frame.vue";
import SectionFrame from "../components/section-frame.vue";
import { tpl } from "../utils";

const {
  id,
  title,
  lead = "",
  badge = "",
  level = 1,
  facts,
  skills,
  labels,
  actions,
  layout = "facts",
  mediaSide = "start",
  tone = "default",
  image,
  imageAlt,
  landmarkLabel,
} = defineProps<AboutMeProps>();
</script>

<template>
  <SectionFrame
    :id="id"
    :title="title"
    :lead="lead"
    :heading="{ badge, level }"
    layout="split"
    :media="{ show: true, side: mediaSide }"
    :tone="tone"
    :landmarkLabel="landmarkLabel"
  >
    <template v-if="((layout as string) === 'facts')">
      <List
        v-if="((facts?.length ?? 0) > 0)"
        tag="ul"
        class="grid grid-cols-1 gap-4 sm:grid-cols-2"
        data-slot="facts"
      >
        <ListItem
          v-for="f in facts"
          :key="f.id"
          class="rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4"
          data-slot="fact"
        >
          <Text size="xs" class="text-muted-foreground">
            {{ f.label }}
          </Text>
          <Text size="sm" weight="semibold">
            {{ f.value }}
          </Text>
        </ListItem>
      </List>
    </template>
    <Stack v-else-if="((skills?.length ?? 0) > 0)" gap="4" align="stretch" data-slot="skills">
      <Stack v-for="s in skills" :key="s.id" gap="2" align="stretch" data-slot="skill">
        <Group gap="4" justify="between">
          <Text size="sm" weight="semibold">
            {{ s.label }}
          </Text>
          <Text size="xs" class="text-muted-foreground">
            {{ tpl(labels.level, s.level) }}
          </Text>
        </Group>
        <Progress :value="(s.level == null ? undefined : String(s.level))" max="100" :aria-label="s.label" />
      </Stack>
    </Stack>
    <ActionGroup
      :primary="actions.cta"
      :primaryHref="actions.href"
      :secondary="((actions.mode === 'two') ? actions.secondary : undefined)"
      :secondaryHref="actions.secondaryHref"
    />
    <template #aside>
      <MediaFrame :alt="(imageAlt ? imageAlt : title)" :src="image" ratio="3/4" />
    </template>
  </SectionFrame>
</template>

Vue registry item (JSON)

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-cdn
npx ui8kit add about-me
blocks/about-me.tsx
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
 * A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of
 * specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills),
 * mediaSide, tone.
 */
import { For, type JSX } from "solid-js";
import { Group, List, ListItem, Progress, Stack, Text } from "../compose";
import { ActionGroup } from "../components/action-group";
import { MediaFrame } from "../components/media-frame";
import { SectionFrame } from "../components/section-frame";
import { tpl } from "../utils";
import type { Skill, AboutMeLabels } from "./about-me.types";
import type { Spec } from "./product-info.types";
import type { LinkActions } from "./error-page.types";

export type AboutMeProps = {
  id: string;
  title: string;
  lead?: string;
  badge?: string;
  level?: 1 | 2;
  facts: Spec[];
  skills: Skill[];
  labels: AboutMeLabels;
  actions: LinkActions;
  layout?: "facts" | "skills";
  mediaSide?: "start" | "end";
  tone?: "default" | "muted";
  image?: string;
  imageAlt?: string;
  landmarkLabel?: string;
};

export function AboutMe({
  id,
  title,
  lead = "",
  badge = "",
  level = 1,
  facts,
  skills,
  labels,
  actions,
  layout = "facts",
  mediaSide = "start",
  tone = "default",
  image,
  imageAlt,
  landmarkLabel,
}: AboutMeProps) {
  return (
    <SectionFrame
      id={id}
      title={title}
      lead={lead}
      heading={{ badge, level }}
      layout="split"
      media={{ show: true, side: mediaSide }}
      tone={tone}
      landmarkLabel={landmarkLabel}
      aside={(
        <MediaFrame alt={(imageAlt ? imageAlt : title)} src={image} ratio="3/4" />
      )}
    >
      {((layout as string) === "facts") ? (
        <>
          {((facts?.length ?? 0) > 0) ? (
            <List tag="ul" class="grid grid-cols-1 gap-4 sm:grid-cols-2" data-slot="facts">
              <For each={facts ?? []}>{(f) => (
                <ListItem class="rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4" data-slot="fact">
                  <Text size="xs" class="text-muted-foreground">
                    {f.label}
                  </Text>
                  <Text size="sm" weight="semibold">
                    {f.value}
                  </Text>
                </ListItem>
              )}</For>
            </List>
          ) : null}
        </>
      ) : ((skills?.length ?? 0) > 0) ? (
        <Stack gap="4" align="stretch" data-slot="skills">
          <For each={skills ?? []}>{(s) => (
            <Stack gap="2" align="stretch" data-slot="skill">
              <Group gap="4" justify="between">
                <Text size="sm" weight="semibold">
                  {s.label}
                </Text>
                <Text size="xs" class="text-muted-foreground">
                  {tpl(labels.level, s.level)}
                </Text>
              </Group>
              <Progress value={(s.level == null ? undefined : String(s.level))} max="100" aria-label={s.label} />
            </Stack>
          )}</For>
        </Stack>
      ) : null}
      <ActionGroup
        primary={actions.cta}
        primaryHref={actions.href}
        secondary={((actions.mode === "two") ? actions.secondary : undefined)}
        secondaryHref={actions.secondaryHref}
      />
    </SectionFrame>
  );
}
blocks/about-me.types.ts
// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.

export type Skill = {
  id: string;
  label: string;
  level: number;
};

export type AboutMeLabels = {
  level: string;
};

Solid registry item (JSON)

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-cdn
npx ui8kit add about-me
blocks/about-me.templ
// 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-me.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/ui/progress"
	"github.com/ui8kit/codegen/generated/templ/ui/text"
	uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)

// AboutMeProps are the props of AboutMe; the values are the JSON shapes of the TypeScript props.
type AboutMeProps struct {
	Id any `json:"id"`
	Title any `json:"title"`
	Lead any `json:"lead"`
	Badge any `json:"badge"`
	Level any `json:"level"`
	Facts any `json:"facts"`
	Skills any `json:"skills"`
	Labels any `json:"labels"`
	Actions any `json:"actions"`
	Layout any `json:"layout"`
	MediaSide any `json:"mediaSide"`
	Tone any `json:"tone"`
	Image any `json:"image"`
	ImageAlt any `json:"imageAlt"`
	LandmarkLabel any `json:"landmarkLabel"`
}

// A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills), mediaSide, tone.
templ AboutMe(p AboutMeProps) {
	{{ vId := p.Id }}
	{{ vTitle := p.Title }}
	{{ vLead := uiutils.Def(p.Lead, "") }}
	{{ vBadge := uiutils.Def(p.Badge, "") }}
	{{ vLevel := uiutils.Def(p.Level, float64(1)) }}
	{{ vFacts := p.Facts }}
	{{ vSkills := p.Skills }}
	{{ vLabels := p.Labels }}
	{{ vActions := p.Actions }}
	{{ vLayout := uiutils.Def(p.Layout, "facts") }}
	{{ vMediaSide := uiutils.Def(p.MediaSide, "start") }}
	{{ vTone := uiutils.Def(p.Tone, "default") }}
	{{ vImage := p.Image }}
	{{ vImageAlt := p.ImageAlt }}
	{{ vLandmarkLabel := p.LandmarkLabel }}
	@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Heading: map[string]any{"badge": vBadge, "level": vLevel}, Layout: "split", Media: map[string]any{"show": true, "side": vMediaSide}, Tone: vTone, LandmarkLabel: vLandmarkLabel, Aside: aboutMeFill1(p, vTitle, vImage, vImageAlt)}) {
		if uiutils.Eq(vLayout, "facts") {
			if uiutils.Gt(uiutils.Len(vFacts), float64(0)) {
				@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: "ul", Class: "grid grid-cols-1 gap-4 sm:grid-cols-2", Attrs: uiutils.Attrs("data-slot", "facts")}}) {
					for _, vF := range uiutils.L(vFacts) {
						@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: "rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4", Attrs: uiutils.Attrs("data-slot", "fact")}}) {
							@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
								{ uiutils.Text(uiutils.Get(vF, "label")) }
							}
							@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{}}) {
								{ uiutils.Text(uiutils.Get(vF, "value")) }
							}
						}
					}
				}
			}
		} else if uiutils.Gt(uiutils.Len(vSkills), float64(0)) {
			@compose.Stack(compose.StackProps{Gap: "4", Align: "stretch", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "skills")}}) {
				for _, vS := range uiutils.L(vSkills) {
					@compose.Stack(compose.StackProps{Gap: "2", Align: "stretch", BoxProps: box.BoxProps{Attrs: uiutils.Attrs("data-slot", "skill")}}) {
						@compose.Group(compose.GroupProps{Gap: "4", Justify: "between", BoxProps: box.BoxProps{}}) {
							@compose.Text(compose.TextProps{Size: "sm", Weight: "semibold", TextProps: text.TextProps{}}) {
								{ uiutils.Text(uiutils.Get(vS, "label")) }
							}
							@compose.Text(compose.TextProps{Size: "xs", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
								{ uiutils.Text(uiutils.Tpl(uiutils.Get(vLabels, "level"), uiutils.Get(vS, "level"))) }
							}
						}
						@compose.Progress(compose.ProgressProps{ProgressProps: progress.ProgressProps{Value: uiutils.SP(uiutils.Str(uiutils.Get(vS, "level"))), Max: "100", Attrs: uiutils.Attrs("aria-label", uiutils.Get(vS, "label"))}})
					}
				}
			}
		}
		@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 aboutMeFill1(p AboutMeProps, vTitle any, vImage any, vImageAlt any) {
	@MediaFrame(MediaFrameProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Src: vImage, Ratio: "3/4"})
}

templ registry item (JSON)

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-cdn
npx ui8kit add about-me
blocks/about-me.html.twig
{#- 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-me.json
    A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills), mediaSide, tone.
    Props (p): id, title, lead, badge, level, facts, skills, labels, actions, layout, mediaSide, tone, image, imageAlt, 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 ?? 1) -%}
{%- set v_facts = (p.facts ?? null) -%}
{%- set v_skills = (p.skills ?? null) -%}
{%- set v_labels = (p.labels ?? null) -%}
{%- set v_actions = (p.actions ?? null) -%}
{%- set v_layout = (p.layout ?? 'facts') -%}
{%- set v_mediaSide = (p.mediaSide ?? 'start') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_image = (p.image ?? null) -%}
{%- set v_imageAlt = (p.imageAlt ?? null) -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set f_10 -%}
  {{ include('blocks/media-frame.html.twig', {'p': {'alt': (og_t(v_imageAlt) ? v_imageAlt : v_title), 'src': v_image, 'ratio': '3/4'}}, with_context = false) }}
{%- endset -%}
{%- set c_11 -%}
  {%- if og_t(og_eq(v_layout, 'facts')) %}
    {%- if og_t(og_gt(og_len(v_facts), 0)) %}
      {%- set c_4 -%}
        {%- for v_f in og_l(v_facts) %}
          {%- set c_3 -%}
            {%- set c_1 -%}
              {{ og_text(og_get(v_f, ['label'])) }}
            {%- endset -%}
            {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_1}, with_context = false) }}
            {%- set c_2 -%}
              {{ og_text(og_get(v_f, ['value'])) }}
            {%- endset -%}
            {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_2}, with_context = false) }}
          {%- endset -%}
          {{ include('compose/ListItem.html.twig', {'class': 'rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4', 'attrs': og_attrs(['data-slot', 'fact']), 'children': c_3}, with_context = false) }}
        {%- endfor %}
      {%- endset -%}
      {{ include('compose/List.html.twig', {'tag': 'ul', 'class': 'grid grid-cols-1 gap-4 sm:grid-cols-2', 'attrs': og_attrs(['data-slot', 'facts']), 'children': c_4}, with_context = false) }}
    {%- endif %}
  {%- elseif og_t(og_gt(og_len(v_skills), 0)) %}
    {%- set c_9 -%}
      {%- for v_s in og_l(v_skills) %}
        {%- set c_8 -%}
          {%- set c_7 -%}
            {%- set c_5 -%}
              {{ og_text(og_get(v_s, ['label'])) }}
            {%- endset -%}
            {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'semibold', 'children': c_5}, with_context = false) }}
            {%- set c_6 -%}
              {{ og_text(og_tpl(og_get(v_labels, ['level']), [og_get(v_s, ['level'])])) }}
            {%- endset -%}
            {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'text-muted-foreground', 'children': c_6}, with_context = false) }}
          {%- endset -%}
          {{ include('compose/Group.html.twig', {'gap': '4', 'justify': 'between', 'children': c_7}, with_context = false) }}
          {{ include('compose/Progress.html.twig', {'value': og_s(og_str(og_get(v_s, ['level']))), 'max': '100', 'attrs': og_attrs(['aria-label', og_get(v_s, ['label'])])}, with_context = false) }}
        {%- endset -%}
        {{ include('compose/Stack.html.twig', {'gap': '2', 'align': 'stretch', 'attrs': og_attrs(['data-slot', 'skill']), 'children': c_8}, with_context = false) }}
      {%- endfor %}
    {%- endset -%}
    {{ include('compose/Stack.html.twig', {'gap': '4', 'align': 'stretch', 'attrs': og_attrs(['data-slot', 'skills']), 'children': c_9}, with_context = false) }}
  {%- endif %}
  {{ include('blocks/action-group.html.twig', {'p': {'primary': og_get(v_actions, ['cta']), 'primaryHref': og_get(v_actions, ['href']), 'secondary': (og_t(og_eq(og_get(v_actions, ['mode']), 'two')) ? og_get(v_actions, ['secondary']) : null), 'secondaryHref': og_get(v_actions, ['secondaryHref'])}}, with_context = false) }}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge, 'level': v_level}, 'layout': 'split', 'media': {'show': true, 'side': v_mediaSide}, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel, 'aside': og_markup(f_10)}, 'children': og_markup(c_11)}, with_context = false) }}

Twig registry item (JSON)

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-cdn
npx ui8kit add about-me
blocks/about-me.latte
{* 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-me.json
    A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills), mediaSide, tone.
    Props (p): id, title, lead, badge, level, facts, skills, labels, actions, layout, mediaSide, tone, image, imageAlt, 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'] ?? 1)}
{var $v_facts = ($p['facts'] ?? null)}
{var $v_skills = ($p['skills'] ?? null)}
{var $v_labels = ($p['labels'] ?? null)}
{var $v_actions = ($p['actions'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'facts')}
{var $v_mediaSide = ($p['mediaSide'] ?? 'start')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_image = ($p['image'] ?? null)}
{var $v_imageAlt = ($p['imageAlt'] ?? null)}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $f_10}
  {=og_include('blocks/media-frame.latte', ['p' => ['alt' => (og_t($v_imageAlt) ? $v_imageAlt : $v_title), 'src' => $v_image, 'ratio' => '3/4']])|noescape}
{/capture}
{capture $c_11}
  {if og_t(og_eq($v_layout, 'facts'))}
    {if og_t(og_gt(og_len($v_facts), 0))}
      {capture $c_4}
        {foreach og_l($v_facts) as $v_f}
          {capture $c_3}
            {capture $c_1}
              {=og_text(og_get($v_f, ['label']))}
            {/capture}
            {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_1])|noescape}
            {capture $c_2}
              {=og_text(og_get($v_f, ['value']))}
            {/capture}
            {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_2])|noescape}
          {/capture}
          {=og_include('compose/ListItem.latte', ['class' => 'rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4', 'attrs' => og_attrs(['data-slot', 'fact']), 'children' => (string) $c_3])|noescape}
        {/foreach}
      {/capture}
      {=og_include('compose/List.latte', ['tag' => 'ul', 'class' => 'grid grid-cols-1 gap-4 sm:grid-cols-2', 'attrs' => og_attrs(['data-slot', 'facts']), 'children' => (string) $c_4])|noescape}
    {/if}
  {elseif og_t(og_gt(og_len($v_skills), 0))}
    {capture $c_9}
      {foreach og_l($v_skills) as $v_s}
        {capture $c_8}
          {capture $c_7}
            {capture $c_5}
              {=og_text(og_get($v_s, ['label']))}
            {/capture}
            {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_5])|noescape}
            {capture $c_6}
              {=og_text(og_tpl(og_get($v_labels, ['level']), [og_get($v_s, ['level'])]))}
            {/capture}
            {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_6])|noescape}
          {/capture}
          {=og_include('compose/Group.latte', ['gap' => '4', 'justify' => 'between', 'children' => (string) $c_7])|noescape}
          {=og_include('compose/Progress.latte', ['value' => og_s(og_str(og_get($v_s, ['level']))), 'max' => '100', 'attrs' => og_attrs(['aria-label', og_get($v_s, ['label'])])])|noescape}
        {/capture}
        {=og_include('compose/Stack.latte', ['gap' => '2', 'align' => 'stretch', 'attrs' => og_attrs(['data-slot', 'skill']), 'children' => (string) $c_8])|noescape}
      {/foreach}
    {/capture}
    {=og_include('compose/Stack.latte', ['gap' => '4', 'align' => 'stretch', 'attrs' => og_attrs(['data-slot', 'skills']), 'children' => (string) $c_9])|noescape}
  {/if}
  {=og_include('blocks/action-group.latte', ['p' => ['primary' => og_get($v_actions, ['cta']), 'primaryHref' => og_get($v_actions, ['href']), 'secondary' => (og_t(og_eq(og_get($v_actions, ['mode']), 'two')) ? og_get($v_actions, ['secondary']) : null), 'secondaryHref' => og_get($v_actions, ['secondaryHref'])]])|noescape}
{/capture}
{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'lead' => $v_lead, 'heading' => ['badge' => $v_badge, 'level' => $v_level], 'layout' => 'split', 'media' => ['show' => true, 'side' => $v_mediaSide], 'tone' => $v_tone, 'landmarkLabel' => $v_landmarkLabel, 'aside' => og_markup($f_10)], 'children' => og_markup($c_11)])|noescape}

Latte registry item (JSON)

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-cdn
npx ui8kit add about-me
blocks/about-me.html.j2
{#- 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-me.json
    A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills), mediaSide, tone.
    Props (p): id, title, lead, badge, level, facts, skills, labels, actions, layout, mediaSide, tone, image, imageAlt, 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_badge = og_def(p['badge'], '') -%}
{%- set v_level = og_def(p['level'], 1) -%}
{%- set v_facts = og_def(p['facts'], none) -%}
{%- set v_skills = og_def(p['skills'], none) -%}
{%- set v_labels = og_def(p['labels'], none) -%}
{%- set v_actions = og_def(p['actions'], none) -%}
{%- set v_layout = og_def(p['layout'], 'facts') -%}
{%- set v_mediaSide = og_def(p['mediaSide'], 'start') -%}
{%- set v_tone = og_def(p['tone'], 'default') -%}
{%- set v_image = og_def(p['image'], none) -%}
{%- set v_imageAlt = og_def(p['imageAlt'], none) -%}
{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}
{%- set f_10 -%}
  {{ og_include('blocks/media-frame.html.j2', {'p': {'alt': (v_imageAlt if og_t(v_imageAlt) else v_title), 'src': v_image, 'ratio': '3/4'}}) }}
{%- endset -%}
{%- set c_11 -%}
  {%- if og_t(og_eq(v_layout, 'facts')) %}
    {%- if og_t(og_gt(og_len(v_facts), 0)) %}
      {%- set c_4 -%}
        {%- for v_f in og_l(v_facts) %}
          {%- set c_3 -%}
            {%- set c_1 -%}
              {{ og_text(og_get(v_f, ['label'])) }}
            {%- endset -%}
            {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_1}) }}
            {%- set c_2 -%}
              {{ og_text(og_get(v_f, ['value'])) }}
            {%- endset -%}
            {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_2}) }}
          {%- endset -%}
          {{ og_include('compose/list-item.html.j2', {'p': {'Class': 'rounded bg-card inset-ring inset-ring-border flex flex-col gap-0 p-4', 'Attrs': og_attrs(['data-slot', 'fact'])}, 'children': c_3}) }}
        {%- endfor %}
      {%- endset -%}
      {{ og_include('compose/list.html.j2', {'p': {'Tag': 'ul', 'Class': 'grid grid-cols-1 gap-4 sm:grid-cols-2', 'Attrs': og_attrs(['data-slot', 'facts'])}, 'children': c_4}) }}
    {%- endif %}
  {%- elif og_t(og_gt(og_len(v_skills), 0)) %}
    {%- set c_9 -%}
      {%- for v_s in og_l(v_skills) %}
        {%- set c_8 -%}
          {%- set c_7 -%}
            {%- set c_5 -%}
              {{ og_text(og_get(v_s, ['label'])) }}
            {%- endset -%}
            {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Weight': 'semibold'}, 'children': c_5}) }}
            {%- set c_6 -%}
              {{ og_text(og_tpl(og_get(v_labels, ['level']), [og_get(v_s, ['level'])])) }}
            {%- endset -%}
            {{ og_include('compose/text.html.j2', {'p': {'Size': 'xs', 'Class': 'text-muted-foreground'}, 'children': c_6}) }}
          {%- endset -%}
          {{ og_include('compose/group.html.j2', {'p': {'Gap': '4', 'Justify': 'between'}, 'children': c_7}) }}
          {{ og_include('compose/progress.html.j2', {'p': {'Value': og_s(og_str(og_get(v_s, ['level']))), 'Max': '100', 'Attrs': og_attrs(['aria-label', og_get(v_s, ['label'])])}}) }}
        {%- endset -%}
        {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Align': 'stretch', 'Attrs': og_attrs(['data-slot', 'skill'])}, 'children': c_8}) }}
      {%- endfor %}
    {%- endset -%}
    {{ og_include('compose/stack.html.j2', {'p': {'Gap': '4', 'Align': 'stretch', 'Attrs': og_attrs(['data-slot', 'skills'])}, 'children': c_9}) }}
  {%- endif %}
  {{ og_include('blocks/action-group.html.j2', {'p': {'primary': og_get(v_actions, ['cta']), 'primaryHref': og_get(v_actions, ['href']), 'secondary': (og_get(v_actions, ['secondary']) if og_t(og_eq(og_get(v_actions, ['mode']), 'two')) else none), 'secondaryHref': og_get(v_actions, ['secondaryHref'])}}) }}
{%- endset -%}
{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'lead': v_lead, 'heading': {'badge': v_badge, 'level': v_level}, 'layout': 'split', 'media': {'show': true, 'side': v_mediaSide}, 'tone': v_tone, 'landmarkLabel': v_landmarkLabel, 'aside': og_markup(f_10)}, 'children': og_markup(c_11)}) }}

Jinja2 registry item (JSON)

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.

A personal about section beside a portrait: a badge, the heading, a lead, then key facts and a list of specialities, or skill chips and expertise bars, and one or two links. Axes: layout (facts, skills), mediaSide, tone.

Props of AboutMe
PropTypeDefault Description
id (required)string-
title (required)string-
lead string""
badge string""
level 1 | 21
facts (required)Spec[]-
skills (required)Skill[]-
labels (required)AboutMeLabels-
actions (required)LinkActions-
layout "facts" | "skills""facts"
mediaSide "start" | "end""start"
tone "default" | "muted""default"
image string-address of the picture (an https URL or a path); none: the placeholder
imageAlt string-alt text of the picture; none: the title
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