Skip to content
ui8kit

block / support

Support Channels

Ways to get help: email, chat, docs.

Install

npx ui8kit add support-channels

Pulls in: card, card-content, compose, empty-state, feature-grid, grid, kit-box, kit-text, lucide-icon, menu-entry, section-frame, stack, text, title, utils

Preview

Other ways to reach us

Email us

Answers within one working day.

Open

Live chat

Talk to a person, weekdays 9 to 18.

Open

Read the docs

Guides and examples for every block.

Open

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 support-channels
blocks/support-channels.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. -->
<!--
  Ways to get help as cards or rows, each with an icon, a title, a sentence and an open link. Axes: layout
  (grid, list), columns, action (link, none), tone (default, muted).
-->
<script lang="ts" module>
  import type { Snippet } from "svelte";
  import type { Feature } from "./feature-grid.types";

  export type SupportChannelsProps = {
    id: string;
    title: string;
    channels: Feature[];
    empty?: string;
    open: string;
    layout?: "grid" | "list";
    cols?: "1-2" | "1-3";
    action?: "link" | "none";
    tone?: "default" | "muted";
    landmarkLabel?: string;
  };
</script>

<script lang="ts">
  import Card from "../compose/Card.svelte";
  import CardContent from "../compose/CardContent.svelte";
  import Grid from "../compose/Grid.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 MenuEntry from "../components/menu-entry.svelte";
  import SectionFrame from "../components/section-frame.svelte";
  import { cn } from "../utils";

  let {
    id,
    title,
    channels,
    empty = "",
    open,
    layout = "grid",
    cols = "1-3",
    action = "link",
    tone = "default",
    landmarkLabel,
  }: SupportChannelsProps = $props();
</script>

<SectionFrame id={id} title={title} tone={tone} landmarkLabel={landmarkLabel}>
  {#if ((channels?.length ?? 0) === 0)}
    <EmptyState icon="life-buoy" title={empty} />
  {:else}
    <Grid cols={(((layout as string) === "list") ? "1" : cols)} class="gap-4" data-slot="items">
      {#each channels as c (c.id)}
        <Card variant="default" class={cn("h-full", (((layout as string) === "list") ? "flex-row items-center" : ""))}>
          <CardContent class={cn("flex flex-1 gap-4", (((layout as string) === "list") ? "items-center" : "flex-col"))}>
            <LucideIcon name={c.icon} size={24} />
            <Stack gap="2" class="flex-1">
              <Title as={3} size="base" weight="bold">
                {c.title}
              </Title>
              <Text size="sm" class="text-muted-foreground">
                {c.text}
              </Text>
            </Stack>
            {#if ((action as string) === "link")}
              <MenuEntry href={c.href} class="font-semibold" testid="open">
                {open}
              </MenuEntry>
            {/if}
          </CardContent>
        </Card>
      {/each}
    </Grid>
  {/if}
</SectionFrame>

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 support-channels
blocks/support-channels.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.
/**
 * Ways to get help as cards or rows, each with an icon, a title, a sentence and an open link. Axes: layout
 * (grid, list), columns, action (link, none), tone (default, muted).
 */
import { type ReactNode } from "react";
import { Card, CardContent, Grid, Stack, Text, Title } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { EmptyState } from "../components/empty-state";
import { MenuEntry } from "../components/menu-entry";
import { SectionFrame } from "../components/section-frame";
import { cn } from "../utils";
import type { Feature } from "./feature-grid.types";

export type SupportChannelsProps = {
  id: string;
  title: string;
  channels: Feature[];
  empty?: string;
  open: string;
  layout?: "grid" | "list";
  cols?: "1-2" | "1-3";
  action?: "link" | "none";
  tone?: "default" | "muted";
  landmarkLabel?: string;
};

export function SupportChannels({
  id,
  title,
  channels,
  empty = "",
  open,
  layout = "grid",
  cols = "1-3",
  action = "link",
  tone = "default",
  landmarkLabel,
}: SupportChannelsProps) {
  return (
    <SectionFrame id={id} title={title} tone={tone} landmarkLabel={landmarkLabel}>
      {((channels?.length ?? 0) === 0) ? (
        <EmptyState icon="life-buoy" title={empty} />
      ) : (
        <Grid cols={(((layout as string) === "list") ? "1" : cols)} className="gap-4" data-slot="items">
          {(channels ?? []).map((c) => (
            <Card key={c.id}
              variant="default"
              className={cn("h-full", (((layout as string) === "list") ? "flex-row items-center" : ""))}
            >
              <CardContent className={cn("flex flex-1 gap-4", (((layout as string) === "list") ? "items-center" : "flex-col"))}>
                <LucideIcon name={c.icon} size={24} />
                <Stack gap="2" className="flex-1">
                  <Title as={3} size="base" weight="bold">
                    {c.title}
                  </Title>
                  <Text size="sm" className="text-muted-foreground">
                    {c.text}
                  </Text>
                </Stack>
                {((action as string) === "link") ? (
                  <MenuEntry href={c.href} className="font-semibold" testid="open">
                    {open}
                  </MenuEntry>
                ) : null}
              </CardContent>
            </Card>
          ))}
        </Grid>
      )}
    </SectionFrame>
  );
}

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 support-channels
blocks/support-channels.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. -->
<!--
  Ways to get help as cards or rows, each with an icon, a title, a sentence and an open link. Axes: layout
  (grid, list), columns, action (link, none), tone (default, muted).
-->
<script lang="ts">
import type { Feature } from "./feature-grid.types";

export type SupportChannelsProps = {
  id: string;
  title: string;
  channels: Feature[];
  empty?: string;
  open: string;
  layout?: "grid" | "list";
  cols?: "1-2" | "1-3";
  action?: "link" | "none";
  tone?: "default" | "muted";
  landmarkLabel?: string;
};
</script>

<script setup lang="ts">
import Card from "../compose/Card.vue";
import CardContent from "../compose/CardContent.vue";
import Grid from "../compose/Grid.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 MenuEntry from "../components/menu-entry.vue";
import SectionFrame from "../components/section-frame.vue";
import { cn } from "../utils";

const {
  id,
  title,
  channels,
  empty = "",
  open,
  layout = "grid",
  cols = "1-3",
  action = "link",
  tone = "default",
  landmarkLabel,
} = defineProps<SupportChannelsProps>();
</script>

<template>
  <SectionFrame :id="id" :title="title" :tone="tone" :landmarkLabel="landmarkLabel">
    <EmptyState v-if="((channels?.length ?? 0) === 0)" icon="life-buoy" :title="empty" />
    <Grid v-else :cols="(((layout as string) === 'list') ? '1' : cols)" class="gap-4" data-slot="items">
      <Card
        v-for="c in channels"
        :key="c.id"
        variant="default"
        :class="cn('h-full', (((layout as string) === 'list') ? 'flex-row items-center' : ''))"
      >
        <CardContent :class="cn('flex flex-1 gap-4', (((layout as string) === 'list') ? 'items-center' : 'flex-col'))">
          <LucideIcon :name="c.icon" :size="24" />
          <Stack gap="2" class="flex-1">
            <Title :as="3" size="base" weight="bold">
              {{ c.title }}
            </Title>
            <Text size="sm" class="text-muted-foreground">
              {{ c.text }}
            </Text>
          </Stack>
          <MenuEntry v-if="((action as string) === 'link')" :href="c.href" class="font-semibold" testid="open">
            {{ open }}
          </MenuEntry>
        </CardContent>
      </Card>
    </Grid>
  </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 support-channels
blocks/support-channels.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.
/**
 * Ways to get help as cards or rows, each with an icon, a title, a sentence and an open link. Axes: layout
 * (grid, list), columns, action (link, none), tone (default, muted).
 */
import { For, type JSX } from "solid-js";
import { Card, CardContent, Grid, Stack, Text, Title } from "../compose";
import { LucideIcon } from "../icons/LucideIcon";
import { EmptyState } from "../components/empty-state";
import { MenuEntry } from "../components/menu-entry";
import { SectionFrame } from "../components/section-frame";
import { cn } from "../utils";
import type { Feature } from "./feature-grid.types";

export type SupportChannelsProps = {
  id: string;
  title: string;
  channels: Feature[];
  empty?: string;
  open: string;
  layout?: "grid" | "list";
  cols?: "1-2" | "1-3";
  action?: "link" | "none";
  tone?: "default" | "muted";
  landmarkLabel?: string;
};

export function SupportChannels({
  id,
  title,
  channels,
  empty = "",
  open,
  layout = "grid",
  cols = "1-3",
  action = "link",
  tone = "default",
  landmarkLabel,
}: SupportChannelsProps) {
  return (
    <SectionFrame id={id} title={title} tone={tone} landmarkLabel={landmarkLabel}>
      {((channels?.length ?? 0) === 0) ? (
        <EmptyState icon="life-buoy" title={empty} />
      ) : (
        <Grid cols={(((layout as string) === "list") ? "1" : cols)} class="gap-4" data-slot="items">
          <For each={channels ?? []}>{(c) => (
            <Card variant="default" class={cn("h-full", (((layout as string) === "list") ? "flex-row items-center" : ""))}>
              <CardContent class={cn("flex flex-1 gap-4", (((layout as string) === "list") ? "items-center" : "flex-col"))}>
                <LucideIcon name={c.icon} size={24} />
                <Stack gap="2" class="flex-1">
                  <Title as={3} size="base" weight="bold">
                    {c.title}
                  </Title>
                  <Text size="sm" class="text-muted-foreground">
                    {c.text}
                  </Text>
                </Stack>
                {((action as string) === "link") ? (
                  <MenuEntry href={c.href} class="font-semibold" testid="open">
                    {open}
                  </MenuEntry>
                ) : null}
              </CardContent>
            </Card>
          )}</For>
        </Grid>
      )}
    </SectionFrame>
  );
}

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 support-channels
blocks/support-channels.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/support-channels.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"
)

// SupportChannelsProps are the props of SupportChannels; the values are the JSON shapes of the TypeScript props.
type SupportChannelsProps struct {
	Id any `json:"id"`
	Title any `json:"title"`
	Channels any `json:"channels"`
	Empty any `json:"empty"`
	Open any `json:"open"`
	Layout any `json:"layout"`
	Cols any `json:"cols"`
	Action any `json:"action"`
	Tone any `json:"tone"`
	LandmarkLabel any `json:"landmarkLabel"`
}

// Ways to get help as cards or rows, each with an icon, a title, a sentence and an open link. Axes: layout (grid, list), columns, action (link, none), tone (default, muted).
templ SupportChannels(p SupportChannelsProps) {
	{{ vId := p.Id }}
	{{ vTitle := p.Title }}
	{{ vChannels := p.Channels }}
	{{ vEmpty := uiutils.Def(p.Empty, "") }}
	{{ vOpen := p.Open }}
	{{ vLayout := uiutils.Def(p.Layout, "grid") }}
	{{ vCols := uiutils.Def(p.Cols, "1-3") }}
	{{ vAction := uiutils.Def(p.Action, "link") }}
	{{ vTone := uiutils.Def(p.Tone, "default") }}
	{{ vLandmarkLabel := p.LandmarkLabel }}
	@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, LandmarkLabel: vLandmarkLabel}) {
		if uiutils.Eq(uiutils.Len(vChannels), float64(0)) {
			@EmptyState(EmptyStateProps{Icon: "life-buoy", Title: vEmpty})
		} else {
			@compose.Grid(compose.GridProps{Cols: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "list")), "1", vCols)), BoxProps: box.BoxProps{Class: "gap-4", Attrs: uiutils.Attrs("data-slot", "items")}}) {
				for _, vC := range uiutils.L(vChannels) {
					@compose.Card(compose.CardProps{Variant: "default", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("h-full", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "list")), "flex-row items-center", "")))}}) {
						@compose.CardContent(compose.CardContentProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("flex flex-1 gap-4", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, "list")), "items-center", "flex-col")))}}) {
							@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vC, "icon")), Size: 24})
							@compose.Stack(compose.StackProps{Gap: "2", BoxProps: box.BoxProps{Class: "flex-1"}}) {
								@compose.Title(compose.TitleProps{As: "3", Size: "base", Weight: "bold", TextProps: text.TextProps{}}) {
									{ uiutils.Text(uiutils.Get(vC, "title")) }
								}
								@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
									{ uiutils.Text(uiutils.Get(vC, "text")) }
								}
							}
							if uiutils.Eq(vAction, "link") {
								@MenuEntry(MenuEntryProps{Href: uiutils.Get(vC, "href"), Class: uiutils.Cnv("font-semibold"), Testid: "open"}) {
									{ uiutils.Text(vOpen) }
								}
							}
						}
					}
				}
			}
		}
	}
}

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 support-channels
blocks/support-channels.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/support-channels.json
    Ways to get help as cards or rows, each with an icon, a title, a sentence and an open link. Axes: layout (grid, list), columns, action (link, none), tone (default, muted).
    Props (p): id, title, channels, empty, open, layout, cols, action, tone, landmarkLabel. -#}
{%- set v_id = (p.id ?? null) -%}
{%- set v_title = (p.title ?? null) -%}
{%- set v_channels = (p.channels ?? null) -%}
{%- set v_empty = (p.empty ?? '') -%}
{%- set v_open = (p.open ?? null) -%}
{%- set v_layout = (p.layout ?? 'grid') -%}
{%- set v_cols = (p.cols ?? '1-3') -%}
{%- set v_action = (p.action ?? 'link') -%}
{%- set v_tone = (p.tone ?? 'default') -%}
{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}
{%- set c_8 -%}
  {%- if og_t(og_eq(og_len(v_channels), 0)) %}
    {{ include('blocks/empty-state.html.twig', {'p': {'icon': 'life-buoy', 'title': v_empty}}, with_context = false) }}
  {%- else %}
    {%- set c_7 -%}
      {%- for v_c in og_l(v_channels) %}
        {%- set c_6 -%}
          {%- set c_5 -%}
            {{ include('icons/LucideIcon.html.twig', {'name': og_s(og_get(v_c, ['icon'])), 'size': 24}, with_context = false) }}
            {%- set c_3 -%}
              {%- set c_1 -%}
                {{ og_text(og_get(v_c, ['title'])) }}
              {%- endset -%}
              {{ include('compose/Title.html.twig', {'as': 3, 'size': 'base', 'weight': 'bold', 'children': c_1}, with_context = false) }}
              {%- set c_2 -%}
                {{ og_text(og_get(v_c, ['text'])) }}
              {%- endset -%}
              {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_2}, with_context = false) }}
            {%- endset -%}
            {{ include('compose/Stack.html.twig', {'gap': '2', 'class': 'flex-1', 'children': c_3}, with_context = false) }}
            {%- if og_t(og_eq(v_action, 'link')) %}
              {%- set c_4 -%}
                {{ og_text(v_open) }}
              {%- endset -%}
              {{ include('blocks/menu-entry.html.twig', {'p': {'href': og_get(v_c, ['href']), 'className': og_cnv(['font-semibold']), 'testid': 'open'}, 'children': og_markup(c_4)}, with_context = false) }}
            {%- endif %}
          {%- endset -%}
          {{ include('compose/CardContent.html.twig', {'class': og_s(og_cnv(['flex flex-1 gap-4', (og_t(og_eq(v_layout, 'list')) ? 'items-center' : 'flex-col')])), 'children': c_5}, with_context = false) }}
        {%- endset -%}
        {{ include('compose/Card.html.twig', {'variant': 'default', 'class': og_s(og_cnv(['h-full', (og_t(og_eq(v_layout, 'list')) ? 'flex-row items-center' : '')])), 'children': c_6}, with_context = false) }}
      {%- endfor %}
    {%- endset -%}
    {{ include('compose/Grid.html.twig', {'cols': og_s((og_t(og_eq(v_layout, 'list')) ? '1' : v_cols)), 'class': 'gap-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, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_8)}, 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 support-channels
blocks/support-channels.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/support-channels.json
    Ways to get help as cards or rows, each with an icon, a title, a sentence and an open link. Axes: layout (grid, list), columns, action (link, none), tone (default, muted).
    Props (p): id, title, channels, empty, open, layout, cols, action, tone, landmarkLabel. *}
{var $v_id = ($p['id'] ?? null)}
{var $v_title = ($p['title'] ?? null)}
{var $v_channels = ($p['channels'] ?? null)}
{var $v_empty = ($p['empty'] ?? '')}
{var $v_open = ($p['open'] ?? null)}
{var $v_layout = ($p['layout'] ?? 'grid')}
{var $v_cols = ($p['cols'] ?? '1-3')}
{var $v_action = ($p['action'] ?? 'link')}
{var $v_tone = ($p['tone'] ?? 'default')}
{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}
{capture $c_8}
  {if og_t(og_eq(og_len($v_channels), 0))}
    {=og_include('blocks/empty-state.latte', ['p' => ['icon' => 'life-buoy', 'title' => $v_empty]])|noescape}
  {else}
    {capture $c_7}
      {foreach og_l($v_channels) as $v_c}
        {capture $c_6}
          {capture $c_5}
            {=og_include('icons/LucideIcon.latte', ['name' => og_s(og_get($v_c, ['icon'])), 'size' => 24])|noescape}
            {capture $c_3}
              {capture $c_1}
                {=og_text(og_get($v_c, ['title']))}
              {/capture}
              {=og_include('compose/Title.latte', ['as' => 3, 'size' => 'base', 'weight' => 'bold', 'children' => (string) $c_1])|noescape}
              {capture $c_2}
                {=og_text(og_get($v_c, ['text']))}
              {/capture}
              {=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_2])|noescape}
            {/capture}
            {=og_include('compose/Stack.latte', ['gap' => '2', 'class' => 'flex-1', 'children' => (string) $c_3])|noescape}
            {if og_t(og_eq($v_action, 'link'))}
              {capture $c_4}
                {=og_text($v_open)}
              {/capture}
              {=og_include('blocks/menu-entry.latte', ['p' => ['href' => og_get($v_c, ['href']), 'className' => og_cnv(['font-semibold']), 'testid' => 'open'], 'children' => og_markup($c_4)])|noescape}
            {/if}
          {/capture}
          {=og_include('compose/CardContent.latte', ['class' => og_s(og_cnv(['flex flex-1 gap-4', (og_t(og_eq($v_layout, 'list')) ? 'items-center' : 'flex-col')])), 'children' => (string) $c_5])|noescape}
        {/capture}
        {=og_include('compose/Card.latte', ['variant' => 'default', 'class' => og_s(og_cnv(['h-full', (og_t(og_eq($v_layout, 'list')) ? 'flex-row items-center' : '')])), 'children' => (string) $c_6])|noescape}
      {/foreach}
    {/capture}
    {=og_include('compose/Grid.latte', ['cols' => og_s((og_t(og_eq($v_layout, 'list')) ? '1' : $v_cols)), 'class' => 'gap-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, 'landmarkLabel' => $v_landmarkLabel], 'children' => og_markup($c_8)])|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 support-channels
blocks/support-channels.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/support-channels.json
    Ways to get help as cards or rows, each with an icon, a title, a sentence and an open link. Axes: layout (grid, list), columns, action (link, none), tone (default, muted).
    Props (p): id, title, channels, empty, open, layout, cols, action, tone, landmarkLabel. -#}
{%- set v_id = og_def(p['id'], none) -%}
{%- set v_title = og_def(p['title'], none) -%}
{%- set v_channels = og_def(p['channels'], none) -%}
{%- set v_empty = og_def(p['empty'], '') -%}
{%- set v_open = og_def(p['open'], none) -%}
{%- set v_layout = og_def(p['layout'], 'grid') -%}
{%- set v_cols = og_def(p['cols'], '1-3') -%}
{%- set v_action = og_def(p['action'], 'link') -%}
{%- set v_tone = og_def(p['tone'], 'default') -%}
{%- set v_landmarkLabel = og_def(p['landmarkLabel'], none) -%}
{%- set c_8 -%}
  {%- if og_t(og_eq(og_len(v_channels), 0)) %}
    {{ og_include('blocks/empty-state.html.j2', {'p': {'icon': 'life-buoy', 'title': v_empty}}) }}
  {%- else %}
    {%- set c_7 -%}
      {%- for v_c in og_l(v_channels) %}
        {%- set c_6 -%}
          {%- set c_5 -%}
            {{ og_include('icons/lucide-icon.html.j2', {'p': {'Name': og_s(og_get(v_c, ['icon'])), 'Size': 24}}) }}
            {%- set c_3 -%}
              {%- set c_1 -%}
                {{ og_text(og_get(v_c, ['title'])) }}
              {%- endset -%}
              {{ og_include('compose/title.html.j2', {'p': {'As': 3, 'Size': 'base', 'Weight': 'bold'}, 'children': c_1}) }}
              {%- set c_2 -%}
                {{ og_text(og_get(v_c, ['text'])) }}
              {%- endset -%}
              {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}
            {%- endset -%}
            {{ og_include('compose/stack.html.j2', {'p': {'Gap': '2', 'Class': 'flex-1'}, 'children': c_3}) }}
            {%- if og_t(og_eq(v_action, 'link')) %}
              {%- set c_4 -%}
                {{ og_text(v_open) }}
              {%- endset -%}
              {{ og_include('blocks/menu-entry.html.j2', {'p': {'href': og_get(v_c, ['href']), 'className': og_cnv(['font-semibold']), 'testid': 'open'}, 'children': og_markup(c_4)}) }}
            {%- endif %}
          {%- endset -%}
          {{ og_include('compose/card-content.html.j2', {'p': {'Class': og_s(og_cnv(['flex flex-1 gap-4', ('items-center' if og_t(og_eq(v_layout, 'list')) else 'flex-col')]))}, 'children': c_5}) }}
        {%- endset -%}
        {{ og_include('compose/card.html.j2', {'p': {'Variant': 'default', 'Class': og_s(og_cnv(['h-full', ('flex-row items-center' if og_t(og_eq(v_layout, 'list')) else '')]))}, 'children': c_6}) }}
      {%- endfor %}
    {%- endset -%}
    {{ og_include('compose/grid.html.j2', {'p': {'Cols': og_s(('1' if og_t(og_eq(v_layout, 'list')) else v_cols)), 'Class': 'gap-4', '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, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_8)}) }}

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.

Ways to get help as cards or rows, each with an icon, a title, a sentence and an open link. Axes: layout (grid, list), columns, action (link, none), tone (default, muted).

Props of SupportChannels
PropTypeDefault Description
id (required)string-
title (required)string-
channels (required)Feature[]-
empty string""the text of the empty state (no records), from the dictionary
open (required)string-text of the link of each channel
layout "grid" | "list""grid"
cols "1-2" | "1-3""1-3"
action "link" | "none""link"
tone "default" | "muted""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