Steps List
Numbered or icon steps in a row or a column.
Install
npx ui8kit add steps-listPulls in: compose, empty-state, icon-badge, inline, kit-box, kit-text, list, list-item, lucide-icon, section-frame, stack, text, title, utils
Preview
How it works
- 1
Pick a plan
Start free and upgrade when the team grows.
- 2
Connect your data
Point the site at your collections and content.
- 3
Choose the blocks
Compose pages from ready blocks and variants.
- 4
Publish
Ship to every runtime with one command.
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 steps-list<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
How it works: numbered or icon steps in a row or a column. Axes: layout (row, column), marker (number, icon),
align, density, tone.
-->
<script lang="ts" module>
import type { Snippet } from "svelte";
import type { Step } from "./steps-list.types";
export type StepsListProps = {
id: string;
title: string;
steps: Step[];
empty?: string;
layout?: "row" | "column";
marker?: "number" | "icon";
align?: "start" | "center";
tone?: "default" | "muted";
density?: "roomy" | "default" | "compact";
landmarkLabel?: string;
};
</script>
<script lang="ts">
import IconBadge from "../compose/IconBadge.svelte";
import Inline from "../compose/Inline.svelte";
import List from "../compose/List.svelte";
import ListItem from "../compose/ListItem.svelte";
import LucideIcon from "../icons/LucideIcon.svelte";
import Stack from "../compose/Stack.svelte";
import Text from "../compose/Text.svelte";
import Title from "../compose/Title.svelte";
import EmptyState from "../components/empty-state.svelte";
import SectionFrame from "../components/section-frame.svelte";
import { cn } from "../utils";
let {
id,
title,
steps,
empty = "",
layout = "row",
marker = "number",
align = "start",
tone = "default",
density = "default",
landmarkLabel,
}: StepsListProps = $props();
</script>
<SectionFrame
id={id}
title={title}
tone={tone}
density={density}
align={align}
measure={(((layout as string) === "row") ? "default" : "2xl")}
landmarkLabel={landmarkLabel}
>
{#if ((steps?.length ?? 0) === 0)}
<EmptyState icon="list-ordered" title={empty} />
{:else}
<List
tag="ol"
class={cn("grid gap-6", (((layout as string) === "row") ? "sm:grid-cols-2 md:grid-cols-4" : ""))}
data-slot="items"
>
{#each steps as step, i (step.id)}
<ListItem
class={cn(
"flex gap-4",
(((layout as string) === "row") ? "flex-col" : ""),
(((align as string) === "center") ? "items-center text-center" : "")
)}
data-slot="item"
>
<IconBadge variant="primary" data-slot="marker">
{#if ((marker as string) === "icon")}
<LucideIcon name={step.icon} size={20} />
{:else}
<Inline class="text-base font-bold">
{((i + 1) == null ? undefined : String((i + 1)))}
</Inline>
{/if}
</IconBadge>
<Stack gap="2" align={(((align as string) === "center") ? "center" : "start")}>
<Title as={3} size="xl" weight="bold">
{step.title}
</Title>
<Text size="sm" class="text-muted-foreground">
{step.text}
</Text>
</Stack>
</ListItem>
{/each}
</List>
{/if}
</SectionFrame>
// 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 Step = {
id: string;
title: string;
text: string;
icon: string;
};
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 steps-list// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* How it works: numbered or icon steps in a row or a column. Axes: layout (row, column), marker (number, icon),
* align, density, tone.
*/
import { type ReactNode } from "react";
import { IconBadge, Inline, List, ListItem, Stack, Text, Title } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { EmptyState } from "../components/empty-state";
import { SectionFrame } from "../components/section-frame";
import { cn } from "../utils";
import type { Step } from "./steps-list.types";
export type StepsListProps = {
id: string;
title: string;
steps: Step[];
empty?: string;
layout?: "row" | "column";
marker?: "number" | "icon";
align?: "start" | "center";
tone?: "default" | "muted";
density?: "roomy" | "default" | "compact";
landmarkLabel?: string;
};
export function StepsList({
id,
title,
steps,
empty = "",
layout = "row",
marker = "number",
align = "start",
tone = "default",
density = "default",
landmarkLabel,
}: StepsListProps) {
return (
<SectionFrame
id={id}
title={title}
tone={tone}
density={density}
align={align}
measure={(((layout as string) === "row") ? "default" : "2xl")}
landmarkLabel={landmarkLabel}
>
{((steps?.length ?? 0) === 0) ? (
<EmptyState icon="list-ordered" title={empty} />
) : (
<List
tag="ol"
className={cn(
"grid gap-6",
(((layout as string) === "row") ? "sm:grid-cols-2 md:grid-cols-4" : "")
)}
data-slot="items"
>
{(steps ?? []).map((step, i) => (
<ListItem key={step.id}
className={cn(
"flex gap-4",
(((layout as string) === "row") ? "flex-col" : ""),
(((align as string) === "center") ? "items-center text-center" : "")
)}
data-slot="item"
>
<IconBadge variant="primary" data-slot="marker">
{((marker as string) === "icon") ? (
<LucideIcon name={step.icon} size={20} />
) : (
<Inline className="text-base font-bold">
{((i + 1) == null ? undefined : String((i + 1)))}
</Inline>
)}
</IconBadge>
<Stack gap="2" align={(((align as string) === "center") ? "center" : "start")}>
<Title as={3} size="xl" weight="bold">
{step.title}
</Title>
<Text size="sm" className="text-muted-foreground">
{step.text}
</Text>
</Stack>
</ListItem>
))}
</List>
)}
</SectionFrame>
);
}
// 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 Step = {
id: string;
title: string;
text: string;
icon: string;
};
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 steps-list// 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 Step = {
id: string;
title: string;
text: string;
icon: string;
};
<!-- Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT. -->
<!--
How it works: numbered or icon steps in a row or a column. Axes: layout (row, column), marker (number, icon),
align, density, tone.
-->
<script lang="ts">
import type { Step } from "./steps-list.types";
export type StepsListProps = {
id: string;
title: string;
steps: Step[];
empty?: string;
layout?: "row" | "column";
marker?: "number" | "icon";
align?: "start" | "center";
tone?: "default" | "muted";
density?: "roomy" | "default" | "compact";
landmarkLabel?: string;
};
</script>
<script setup lang="ts">
import IconBadge from "../compose/IconBadge.vue";
import Inline from "../compose/Inline.vue";
import List from "../compose/List.vue";
import ListItem from "../compose/ListItem.vue";
import LucideIcon from "../icons/LucideIcon.vue";
import Stack from "../compose/Stack.vue";
import Text from "../compose/Text.vue";
import Title from "../compose/Title.vue";
import EmptyState from "../components/empty-state.vue";
import SectionFrame from "../components/section-frame.vue";
import { cn } from "../utils";
const {
id,
title,
steps,
empty = "",
layout = "row",
marker = "number",
align = "start",
tone = "default",
density = "default",
landmarkLabel,
} = defineProps<StepsListProps>();
</script>
<template>
<SectionFrame
:id="id"
:title="title"
:tone="tone"
:density="density"
:align="align"
:measure="(((layout as string) === 'row') ? 'default' : '2xl')"
:landmarkLabel="landmarkLabel"
>
<EmptyState v-if="((steps?.length ?? 0) === 0)" icon="list-ordered" :title="empty" />
<List v-else
tag="ol"
:class="cn('grid gap-6', (((layout as string) === 'row') ? 'sm:grid-cols-2 md:grid-cols-4' : ''))"
data-slot="items"
>
<ListItem v-for="(step, i) in steps" :key="step.id"
:class="cn(
'flex gap-4',
(((layout as string) === 'row') ? 'flex-col' : ''),
(((align as string) === 'center') ? 'items-center text-center' : '')
)"
data-slot="item"
>
<IconBadge variant="primary" data-slot="marker">
<LucideIcon v-if="((marker as string) === 'icon')" :name="step.icon" :size="20" />
<Inline v-else class="text-base font-bold">
{{ ((i + 1) == null ? undefined : String((i + 1))) }}
</Inline>
</IconBadge>
<Stack gap="2" :align="(((align as string) === 'center') ? 'center' : 'start')">
<Title :as="3" size="xl" weight="bold">
{{ step.title }}
</Title>
<Text size="sm" class="text-muted-foreground">
{{ step.text }}
</Text>
</Stack>
</ListItem>
</List>
</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 steps-list// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.
/**
* How it works: numbered or icon steps in a row or a column. Axes: layout (row, column), marker (number, icon),
* align, density, tone.
*/
import { For, type JSX } from "solid-js";
import { IconBadge, Inline, List, ListItem, Stack, Text, Title } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { EmptyState } from "../components/empty-state";
import { SectionFrame } from "../components/section-frame";
import { cn } from "../utils";
import type { Step } from "./steps-list.types";
export type StepsListProps = {
id: string;
title: string;
steps: Step[];
empty?: string;
layout?: "row" | "column";
marker?: "number" | "icon";
align?: "start" | "center";
tone?: "default" | "muted";
density?: "roomy" | "default" | "compact";
landmarkLabel?: string;
};
export function StepsList({
id,
title,
steps,
empty = "",
layout = "row",
marker = "number",
align = "start",
tone = "default",
density = "default",
landmarkLabel,
}: StepsListProps) {
return (
<SectionFrame
id={id}
title={title}
tone={tone}
density={density}
align={align}
measure={(((layout as string) === "row") ? "default" : "2xl")}
landmarkLabel={landmarkLabel}
>
{((steps?.length ?? 0) === 0) ? (
<EmptyState icon="list-ordered" title={empty} />
) : (
<List
tag="ol"
class={cn("grid gap-6", (((layout as string) === "row") ? "sm:grid-cols-2 md:grid-cols-4" : ""))}
data-slot="items"
>
<For each={steps ?? []}>{(step, iOf) => { const i = iOf(); return (
<ListItem
class={cn(
"flex gap-4",
(((layout as string) === "row") ? "flex-col" : ""),
(((align as string) === "center") ? "items-center text-center" : "")
)}
data-slot="item"
>
<IconBadge variant="primary" data-slot="marker">
{((marker as string) === "icon") ? (
<LucideIcon name={step.icon} size={20} />
) : (
<Inline class="text-base font-bold">
{((i + 1) == null ? undefined : String((i + 1)))}
</Inline>
)}
</IconBadge>
<Stack gap="2" align={(((align as string) === "center") ? "center" : "start")}>
<Title as={3} size="xl" weight="bold">
{step.title}
</Title>
<Text size="sm" class="text-muted-foreground">
{step.text}
</Text>
</Stack>
</ListItem>
); }}</For>
</List>
)}
</SectionFrame>
);
}
// 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 Step = {
id: string;
title: string;
text: string;
icon: string;
};
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 steps-list// 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/steps-list.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"
)
// StepsListProps are the props of StepsList; the values are the JSON shapes of the TypeScript props.
type StepsListProps struct {
Id any `json:"id"`
Title any `json:"title"`
Steps any `json:"steps"`
Empty any `json:"empty"`
Layout any `json:"layout"`
Marker any `json:"marker"`
Align any `json:"align"`
Tone any `json:"tone"`
Density any `json:"density"`
LandmarkLabel any `json:"landmarkLabel"`
}
// How it works: numbered or icon steps in a row or a column. Axes: layout (row, column), marker (number, icon), align, density, tone.
templ StepsList(p StepsListProps) {
{{ vId := p.Id }}
{{ vTitle := p.Title }}
{{ vSteps := p.Steps }}
{{ vEmpty := uiutils.Def(p.Empty, "") }}
{{ vLayout := uiutils.Def(p.Layout, "row") }}
{{ vMarker := uiutils.Def(p.Marker, "number") }}
{{ vAlign := uiutils.Def(p.Align, "start") }}
{{ 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, Align: vAlign, Measure: uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "row")), "default", "2xl"), LandmarkLabel: vLandmarkLabel}) {
if uiutils.Eq(uiutils.Len(vSteps), float64(0)) {
@EmptyState(EmptyStateProps{Icon: "list-ordered", Title: vEmpty})
} else {
@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: "ol", Class: uiutils.S(uiutils.Cnv("grid gap-6", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "row")), "sm:grid-cols-2 md:grid-cols-4", ""))), Attrs: uiutils.Attrs("data-slot", "items")}}) {
for vI, vStep := range uiutils.L(vSteps) {
@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("flex gap-4", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "row")), "flex-col", ""), uiutils.Cond(uiutils.T(uiutils.Eq(vAlign, "center")), "items-center text-center", ""))), Attrs: uiutils.Attrs("data-slot", "item")}}) {
@compose.IconBadge(compose.IconBadgeProps{Variant: "primary", TextProps: text.TextProps{Attrs: uiutils.Attrs("data-slot", "marker")}}) {
if uiutils.Eq(vMarker, "icon") {
@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vStep, "icon")), Size: 20})
} else {
@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: "text-base font-bold"}}) {
{ uiutils.Text(uiutils.Str(uiutils.Add(float64(vI), float64(1)))) }
}
}
}
@compose.Stack(compose.StackProps{Gap: "2", Align: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vAlign, "center")), "center", "start")), BoxProps: box.BoxProps{}}) {
@compose.Title(compose.TitleProps{As: "3", Size: "xl", Weight: "bold", TextProps: text.TextProps{}}) {
{ uiutils.Text(uiutils.Get(vStep, "title")) }
}
@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
{ uiutils.Text(uiutils.Get(vStep, "text")) }
}
}
}
}
}
}
}
}
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 steps-list{#- 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/steps-list.json
How it works: numbered or icon steps in a row or a column. Axes: layout (row, column), marker (number, icon), align, density, tone.
Props (p): id, title, steps, empty, layout, marker, align, tone, density, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_steps = (p.steps ?? null) -%}
{%- set v_empty = (p.empty ?? '') -%}
{%- set v_layout = (p.layout ?? 'row') -%}
{%- set v_marker = (p.marker ?? 'number') -%}
{%- set v_align = (p.align ?? 'start') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_density = (p.density ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_8 -%}
{%- if og_t(og_eq(og_len(v_steps), 0)) %}
{{ include('blocks/empty-state.html.twig', {'p': {'icon': 'list-ordered', 'title': v_empty}}, with_context = false) }}
{%- else %}
{%- set c_7 -%}
{%- for v_step in og_l(v_steps) %}
{%- set v_i = loop.index0 -%}
{%- set c_6 -%}
{%- set c_2 -%}
{%- if og_t(og_eq(v_marker, 'icon')) %}
{{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_step, ['icon'])), 'size': 20}, with_context = false) }}
{%- else %}
{%- set c_1 -%}
{{ og_text(og_str(og_add(v_i, 1))) }}
{%- endset -%}
{{ include('compose/Inline.html.twig', {'class': 'text-base font-bold', 'children': c_1}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('compose/IconBadge.html.twig', {'variant': 'primary', 'attrs': og_attrs(['data-slot', 'marker']), 'children': c_2}, with_context = false) }}
{%- set c_5 -%}
{%- set c_3 -%}
{{ og_text(og_get(v_step, ['title'])) }}
{%- endset -%}
{{ include('compose/Title.html.twig', {'as': 3, 'size': 'xl', 'weight': 'bold', 'children': c_3}, with_context = false) }}
{%- set c_4 -%}
{{ og_text(og_get(v_step, ['text'])) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_4}, with_context = false) }}
{%- endset -%}
{{ include('compose/Stack.html.twig', {'gap': '2', 'align': og_s((og_t(og_eq(v_align, 'center')) ? 'center' : 'start')), 'children': c_5}, with_context = false) }}
{%- endset -%}
{{ include('compose/ListItem.html.twig', {'class': og_s(og_cnv(['flex gap-4', (og_t(og_eq(v_layout, 'row')) ? 'flex-col' : ''), (og_t(og_eq(v_align, 'center')) ? 'items-center text-center' : '')])), 'attrs': og_attrs(['data-slot', 'item']), 'children': c_6}, with_context = false) }}
{%- endfor %}
{%- endset -%}
{{ include('compose/List.html.twig', {'tag': 'ol', 'class': og_s(og_cnv(['grid gap-6', (og_t(og_eq(v_layout, 'row')) ? 'sm:grid-cols-2 md:grid-cols-4' : '')])), 'attrs': og_attrs(['data-slot', 'items']), 'children': c_7}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'align': v_align, 'measure': (og_t(og_eq(v_layout, 'row')) ? 'default' : '2xl'), 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_8)}, 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 steps-list{* 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/steps-list.json
How it works: numbered or icon steps in a row or a column. Axes: layout (row, column), marker (number, icon), align, density, tone.
Props (p): id, title, steps, empty, layout, marker, align, tone, density, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_steps = ($p['steps'] ?? null)}
{var $v_empty = ($p['empty'] ?? '')}
{var $v_layout = ($p['layout'] ?? 'row')}
{var $v_marker = ($p['marker'] ?? 'number')}
{var $v_align = ($p['align'] ?? 'start')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_density = ($p['density'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_8}
{if og_t(og_eq(og_len($v_steps), 0))}
{=og_include('blocks/empty-state.latte', ['p' => ['icon' => 'list-ordered', 'title' => $v_empty]])|noescape}
{else}
{capture $c_7}
{foreach og_l($v_steps) as $v_step}
{var $v_i = $iterator->counter0}
{capture $c_6}
{capture $c_2}
{if og_t(og_eq($v_marker, 'icon'))}
{=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_step, ['icon'])), 'size' => 20])|noescape}
{else}
{capture $c_1}
{=og_text(og_str(og_add($v_i, 1)))}
{/capture}
{=og_include('compose/Inline.latte', ['class' => 'text-base font-bold', 'children' => (string) $c_1])|noescape}
{/if}
{/capture}
{=og_include('compose/IconBadge.latte', ['variant' => 'primary', 'attrs' => og_attrs(['data-slot', 'marker']), 'children' => (string) $c_2])|noescape}
{capture $c_5}
{capture $c_3}
{=og_text(og_get($v_step, ['title']))}
{/capture}
{=og_include('compose/Title.latte', ['as' => 3, 'size' => 'xl', 'weight' => 'bold', 'children' => (string) $c_3])|noescape}
{capture $c_4}
{=og_text(og_get($v_step, ['text']))}
{/capture}
{=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_4])|noescape}
{/capture}
{=og_include('compose/Stack.latte', ['gap' => '2', 'align' => og_s((og_t(og_eq($v_align, 'center')) ? 'center' : 'start')), 'children' => (string) $c_5])|noescape}
{/capture}
{=og_include('compose/ListItem.latte', ['class' => og_s(og_cnv(['flex gap-4', (og_t(og_eq($v_layout, 'row')) ? 'flex-col' : ''), (og_t(og_eq($v_align, 'center')) ? 'items-center text-center' : '')])), 'attrs' => og_attrs(['data-slot', 'item']), 'children' => (string) $c_6])|noescape}
{/foreach}
{/capture}
{=og_include('compose/List.latte', ['tag' => 'ol', 'class' => og_s(og_cnv(['grid gap-6', (og_t(og_eq($v_layout, 'row')) ? 'sm:grid-cols-2 md:grid-cols-4' : '')])), 'attrs' => og_attrs(['data-slot', 'items']), 'children' => (string) $c_7])|noescape}
{/if}
{/capture}
{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'tone' => $v_tone, 'density' => $v_density, 'align' => $v_align, 'measure' => (og_t(og_eq($v_layout, 'row')) ? 'default' : '2xl'), 'landmarkLabel' => $v_landmarkLabel], 'children' => og_markup($c_8)])|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 steps-list{#- 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/steps-list.json
How it works: numbered or icon steps in a row or a column. Axes: layout (row, column), marker (number, icon), align, density, tone.
Props (p): id, title, steps, empty, layout, marker, align, tone, density, landmarkLabel. -#}
{%- set v_id = og_def(p['id'], none) -%}
{%- set v_title = og_def(p['title'], none) -%}
{%- set v_steps = og_def(p['steps'], none) -%}
{%- set v_empty = og_def(p['empty'], '') -%}
{%- set v_layout = og_def(p['layout'], 'row') -%}
{%- set v_marker = og_def(p['marker'], 'number') -%}
{%- set v_align = og_def(p['align'], 'start') -%}
{%- 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 c_8 -%}
{%- if og_t(og_eq(og_len(v_steps), 0)) %}
{{ og_include('blocks/empty-state.html.j2', {'p': {'icon': 'list-ordered', 'title': v_empty}}) }}
{%- else %}
{%- set c_7 -%}
{%- for v_step in og_l(v_steps) %}
{%- set v_i = loop.index0 -%}
{%- set c_6 -%}
{%- set c_2 -%}
{%- if og_t(og_eq(v_marker, 'icon')) %}
{{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_step, ['icon'])), 'Size': 20}}) }}
{%- else %}
{%- set c_1 -%}
{{ og_text(og_str(og_add(v_i, 1))) }}
{%- endset -%}
{{ og_include('compose/inline.html.j2', {'p': {'Class': 'text-base font-bold'}, 'children': c_1}) }}
{%- endif %}
{%- endset -%}
{{ og_include('compose/icon-badge.html.j2', {'p': {'Variant': 'primary', 'Attrs': og_attrs(['data-slot', 'marker'])}, 'children': c_2}) }}
{%- set c_5 -%}
{%- set c_3 -%}
{{ og_text(og_get(v_step, ['title'])) }}
{%- endset -%}
{{ og_include('compose/title.html.j2', {'p': {'As': 3, 'Size': 'xl', 'Weight': 'bold'}, 'children': c_3}) }}
{%- set c_4 -%}
{{ og_text(og_get(v_step, ['text'])) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_4}) }}
{%- endset -%}
{{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Align': og_s(('center' if og_t(og_eq(v_align, 'center')) else 'start'))}, 'children': c_5}) }}
{%- endset -%}
{{ og_include('compose/list-item.html.j2', {'p': {'Class': og_s(og_cnv(['flex gap-4', ('flex-col' if og_t(og_eq(v_layout, 'row')) else ''), ('items-center text-center' if og_t(og_eq(v_align, 'center')) else '')])), 'Attrs': og_attrs(['data-slot', 'item'])}, 'children': c_6}) }}
{%- endfor %}
{%- endset -%}
{{ og_include('compose/list.html.j2', {'p': {'Tag': 'ol', 'Class': og_s(og_cnv(['grid gap-6', ('sm:grid-cols-2 md:grid-cols-4' if og_t(og_eq(v_layout, 'row')) else '')])), 'Attrs': og_attrs(['data-slot', 'items'])}, 'children': c_7}) }}
{%- endif %}
{%- endset -%}
{{ og_include('blocks/section-frame.html.j2', {'p': {'id': v_id, 'title': v_title, 'tone': v_tone, 'density': v_density, 'align': v_align, 'measure': ('default' if og_t(og_eq(v_layout, 'row')) else '2xl'), 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_8)}) }}
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.
How it works: numbered or icon steps in a row or a column. Axes: layout (row, column), marker (number, icon), align, density, tone.
| Prop | Type | Default | Description |
|---|---|---|---|
| id (required) | string | - | |
| title (required) | string | - | |
| steps (required) | Step[] | - | |
| empty | string | "" | the text of the empty state (no records), from the dictionary |
| layout | "row" | "column" | "row" | |
| marker | "number" | "icon" | "number" | |
| align | "start" | "center" | "start" | |
| tone | "default" | "muted" | "default" | |
| density | "roomy" | "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 |