Skip to content
ui8kit

component / components

Quote Proof

Quote Proof component

Install

npx ui8kit add quote-proof

Pulls in: block, compose, kit-box, kit-text, text, utils

Preview

We shipped our site in a week.

Mara Quinn, Northwind

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 quote-proof
components/quote-proof.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 customer quote and who said it, as a figure. -->
<script lang="ts" module>
  import type { Snippet } from "svelte";

  export type QuoteProofProps = {
    quote?: string;
    quoteBy?: string;
    center?: boolean;
  };
</script>

<script lang="ts">
  import Block from "../compose/Block.svelte";
  import Text from "../compose/Text.svelte";
  import { cn } from "../utils";

  let { quote, quoteBy, center = false }: QuoteProofProps = $props();
</script>

<Block
  tag="figure"
  class={cn("flex flex-col gap-2", (center ? "items-center text-center" : ""))}
  data-slot="proof"
>
  <Text size="xl">
    {quote}
  </Text>
  <Text size="sm" class="text-muted-foreground">
    {quoteBy}
  </Text>
</Block>

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 quote-proof
components/quote-proof.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 customer quote and who said it, as a figure. */
import { type ReactNode } from "react";
import { Block, Text } from "../compose";
import { cn } from "../utils";

export type QuoteProofProps = {
  quote?: string;
  quoteBy?: string;
  center?: boolean;
};

export function QuoteProof({ quote, quoteBy, center = false }: QuoteProofProps) {
  return (
    <Block
      tag="figure"
      className={cn("flex flex-col gap-2", (center ? "items-center text-center" : ""))}
      data-slot="proof"
    >
      <Text size="xl">
        {quote}
      </Text>
      <Text size="sm" className="text-muted-foreground">
        {quoteBy}
      </Text>
    </Block>
  );
}

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 quote-proof
components/quote-proof.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 customer quote and who said it, as a figure. -->
<script lang="ts">
export type QuoteProofProps = {
  quote?: string;
  quoteBy?: string;
  center?: boolean;
};
</script>

<script setup lang="ts">
import Block from "../compose/Block.vue";
import Text from "../compose/Text.vue";
import { cn } from "../utils";

const { quote, quoteBy, center = false } = defineProps<QuoteProofProps>();
</script>

<template>
  <Block
    tag="figure"
    :class="cn('flex flex-col gap-2', (center ? 'items-center text-center' : ''))"
    data-slot="proof"
  >
    <Text size="xl">
      {{ quote }}
    </Text>
    <Text size="sm" class="text-muted-foreground">
      {{ quoteBy }}
    </Text>
  </Block>
</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 quote-proof
components/quote-proof.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 customer quote and who said it, as a figure. */
import { type JSX } from "solid-js";
import { Block, Text } from "../compose";
import { cn } from "../utils";

export type QuoteProofProps = {
  quote?: string;
  quoteBy?: string;
  center?: boolean;
};

export function QuoteProof({ quote, quoteBy, center = false }: QuoteProofProps) {
  return (
    <Block
      tag="figure"
      class={cn("flex flex-col gap-2", (center ? "items-center text-center" : ""))}
      data-slot="proof"
    >
      <Text size="xl">
        {quote}
      </Text>
      <Text size="sm" class="text-muted-foreground">
        {quoteBy}
      </Text>
    </Block>
  );
}

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 quote-proof
blocks/quote-proof.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/quote-proof.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/text"
	uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)

// QuoteProofProps are the props of QuoteProof; the values are the JSON shapes of the TypeScript props.
type QuoteProofProps struct {
	Quote any `json:"quote"`
	QuoteBy any `json:"quoteBy"`
	Center any `json:"center"`
}

// A customer quote and who said it, as a figure.
templ QuoteProof(p QuoteProofProps) {
	{{ vQuote := p.Quote }}
	{{ vQuoteBy := p.QuoteBy }}
	{{ vCenter := uiutils.Def(p.Center, false) }}
	@compose.Block(compose.BlockProps{BoxProps: box.BoxProps{Tag: "figure", Class: uiutils.S(uiutils.Cnv("flex flex-col gap-2", uiutils.Cond(uiutils.T(vCenter), "items-center text-center", ""))), Attrs: uiutils.Attrs("data-slot", "proof")}}) {
		@compose.Text(compose.TextProps{Size: "xl", TextProps: text.TextProps{}}) {
			{ uiutils.Text(vQuote) }
		}
		@compose.Text(compose.TextProps{Size: "sm", TextProps: text.TextProps{Class: "text-muted-foreground"}}) {
			{ uiutils.Text(vQuoteBy) }
		}
	}
}

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 quote-proof
blocks/quote-proof.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/quote-proof.json
    A customer quote and who said it, as a figure.
    Props (p): quote, quoteBy, center. -#}
{%- set v_quote = (p.quote ?? null) -%}
{%- set v_quoteBy = (p.quoteBy ?? null) -%}
{%- set v_center = (p.center ?? false) -%}
{%- set c_3 -%}
  {%- set c_1 -%}
    {{ og_text(v_quote) }}
  {%- endset -%}
  {{ include('compose/Text.html.twig', {'size': 'xl', 'children': c_1}, with_context = false) }}
  {%- set c_2 -%}
    {{ og_text(v_quoteBy) }}
  {%- endset -%}
  {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('compose/Block.html.twig', {'tag': 'figure', 'class': og_s(og_cnv(['flex flex-col gap-2', (og_t(v_center) ? 'items-center text-center' : '')])), 'attrs': og_attrs(['data-slot', 'proof']), 'children': c_3}, 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 quote-proof
blocks/quote-proof.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/quote-proof.json
    A customer quote and who said it, as a figure.
    Props (p): quote, quoteBy, center. *}
{var $v_quote = ($p['quote'] ?? null)}
{var $v_quoteBy = ($p['quoteBy'] ?? null)}
{var $v_center = ($p['center'] ?? false)}
{capture $c_3}
  {capture $c_1}
    {=og_text($v_quote)}
  {/capture}
  {=og_include('compose/Text.latte', ['size' => 'xl', 'children' => (string) $c_1])|noescape}
  {capture $c_2}
    {=og_text($v_quoteBy)}
  {/capture}
  {=og_include('compose/Text.latte', ['size' => 'sm', 'class' => 'text-muted-foreground', 'children' => (string) $c_2])|noescape}
{/capture}
{=og_include('compose/Block.latte', ['tag' => 'figure', 'class' => og_s(og_cnv(['flex flex-col gap-2', (og_t($v_center) ? 'items-center text-center' : '')])), 'attrs' => og_attrs(['data-slot', 'proof']), 'children' => (string) $c_3])|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 quote-proof
blocks/quote-proof.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/quote-proof.json
    A customer quote and who said it, as a figure.
    Props (p): quote, quoteBy, center. -#}
{%- set v_quote = og_def(p['quote'], none) -%}
{%- set v_quoteBy = og_def(p['quoteBy'], none) -%}
{%- set v_center = og_def(p['center'], false) -%}
{%- set c_3 -%}
  {%- set c_1 -%}
    {{ og_text(v_quote) }}
  {%- endset -%}
  {{ og_include('compose/text.html.j2', {'p': {'Size': 'xl'}, 'children': c_1}) }}
  {%- set c_2 -%}
    {{ og_text(v_quoteBy) }}
  {%- endset -%}
  {{ og_include('compose/text.html.j2', {'p': {'Size': 'sm', 'Class': 'text-muted-foreground'}, 'children': c_2}) }}
{%- endset -%}
{{ og_include('compose/block.html.j2', {'p': {'Tag': 'figure', 'Class': og_s(og_cnv(['flex flex-col gap-2', ('items-center text-center' if og_t(v_center) else '')])), 'Attrs': og_attrs(['data-slot', 'proof'])}, 'children': c_3}) }}

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 customer quote and who said it, as a figure.

Props of QuoteProof
PropTypeDefault Description
quote string-
quoteBy string-
center booleanfalse

Used in