Meter Row
Meter Row component
Install
npx ui8kit add meter-rowPulls in: box, compose, kit-box, kit-link, kit-progress, kit-text, link, progress, text, utils
Preview
Mon
42%
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 meter-row<!-- 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 name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With
`href` the whole row is a link.
-->
<script lang="ts" module>
import type { Snippet } from "svelte";
export type MeterRowProps = {
label: string;
value: number;
caption: string;
hint?: string;
href?: string;
class?: string;
};
</script>
<script lang="ts">
import Box from "../compose/Box.svelte";
import Link from "../compose/Link.svelte";
import Progress from "../compose/Progress.svelte";
import Text from "../compose/Text.svelte";
import { cn, urlOf } from "../utils";
let { label, value, caption, hint, href, class: className }: MeterRowProps = $props();
</script>
<Box class={cn("min-w-0", className)} data-slot="meter-row">
{#if href}
<Link
href={urlOf(href)}
variant="block"
class="flex min-w-0 flex-col gap-2 rounded p-2 text-foreground no-underline hover:bg-muted"
>
<Box class="flex items-baseline justify-between gap-4">
<Text class="m-0 min-w-0 truncate text-sm font-bold text-foreground">
{label}
</Text>
<Text class="m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground">
{caption}
</Text>
</Box>
<Progress value={(value == null ? undefined : String(value))} max="100" aria-label={label} />
{#if hint}
<Text class="m-0 text-xs font-medium text-muted-foreground">
{hint}
</Text>
{/if}
</Link>
{:else}
<Box class="flex min-w-0 flex-col gap-2 p-2">
<Box class="flex items-baseline justify-between gap-4">
<Text class="m-0 min-w-0 truncate text-sm font-bold text-foreground">
{label}
</Text>
<Text class="m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground">
{caption}
</Text>
</Box>
<Progress value={(value == null ? undefined : String(value))} max="100" aria-label={label} />
{#if hint}
<Text class="m-0 text-xs font-medium text-muted-foreground">
{hint}
</Text>
{/if}
</Box>
{/if}
</Box>
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 meter-row// 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 name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With
* `href` the whole row is a link.
*/
import { type ReactNode } from "react";
import { Box, Link, Progress, Text } from "../compose";
import { cn, urlOf } from "../utils";
export type MeterRowProps = {
label: string;
value: number;
caption: string;
hint?: string;
href?: string;
className?: string;
};
export function MeterRow({ label, value, caption, hint, href, className }: MeterRowProps) {
return (
<Box className={cn("min-w-0", className)} data-slot="meter-row">
{href ? (
<Link
href={urlOf(href)}
variant="block"
className="flex min-w-0 flex-col gap-2 rounded p-2 text-foreground no-underline hover:bg-muted"
>
<Box className="flex items-baseline justify-between gap-4">
<Text className="m-0 min-w-0 truncate text-sm font-bold text-foreground">
{label}
</Text>
<Text className="m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground">
{caption}
</Text>
</Box>
<Progress value={(value == null ? undefined : String(value))} max="100" aria-label={label} />
{hint ? (
<Text className="m-0 text-xs font-medium text-muted-foreground">
{hint}
</Text>
) : null}
</Link>
) : (
<Box className="flex min-w-0 flex-col gap-2 p-2">
<Box className="flex items-baseline justify-between gap-4">
<Text className="m-0 min-w-0 truncate text-sm font-bold text-foreground">
{label}
</Text>
<Text className="m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground">
{caption}
</Text>
</Box>
<Progress value={(value == null ? undefined : String(value))} max="100" aria-label={label} />
{hint ? (
<Text className="m-0 text-xs font-medium text-muted-foreground">
{hint}
</Text>
) : null}
</Box>
)}
</Box>
);
}
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 meter-row<!-- 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 name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With
`href` the whole row is a link.
-->
<script lang="ts">
export type MeterRowProps = {
label: string;
value: number;
caption: string;
hint?: string;
href?: string;
class?: string;
};
</script>
<script setup lang="ts">
import Box from "../compose/Box.vue";
import Link from "../compose/Link.vue";
import Progress from "../compose/Progress.vue";
import Text from "../compose/Text.vue";
import { cn, urlOf } from "../utils";
const { label, value, caption, hint, href, class: className } = defineProps<MeterRowProps>();
</script>
<template>
<Box :class="cn('min-w-0', className)" data-slot="meter-row">
<Link v-if="href"
:href="urlOf(href)"
variant="block"
class="flex min-w-0 flex-col gap-2 rounded p-2 text-foreground no-underline hover:bg-muted"
>
<Box class="flex items-baseline justify-between gap-4">
<Text class="m-0 min-w-0 truncate text-sm font-bold text-foreground">
{{ label }}
</Text>
<Text class="m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground">
{{ caption }}
</Text>
</Box>
<Progress :value="(value == null ? undefined : String(value))" max="100" :aria-label="label" />
<Text v-if="hint" class="m-0 text-xs font-medium text-muted-foreground">
{{ hint }}
</Text>
</Link>
<Box v-else class="flex min-w-0 flex-col gap-2 p-2">
<Box class="flex items-baseline justify-between gap-4">
<Text class="m-0 min-w-0 truncate text-sm font-bold text-foreground">
{{ label }}
</Text>
<Text class="m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground">
{{ caption }}
</Text>
</Box>
<Progress :value="(value == null ? undefined : String(value))" max="100" :aria-label="label" />
<Text v-if="hint" class="m-0 text-xs font-medium text-muted-foreground">
{{ hint }}
</Text>
</Box>
</Box>
</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 meter-row// 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 name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With
* `href` the whole row is a link.
*/
import { type JSX } from "solid-js";
import { Box, Link, Progress, Text } from "../compose";
import { cn, urlOf } from "../utils";
export type MeterRowProps = {
label: string;
value: number;
caption: string;
hint?: string;
href?: string;
class?: string;
};
export function MeterRow({ label, value, caption, hint, href, class: className }: MeterRowProps) {
return (
<Box class={cn("min-w-0", className)} data-slot="meter-row">
{href ? (
<Link
href={urlOf(href)}
variant="block"
class="flex min-w-0 flex-col gap-2 rounded p-2 text-foreground no-underline hover:bg-muted"
>
<Box class="flex items-baseline justify-between gap-4">
<Text class="m-0 min-w-0 truncate text-sm font-bold text-foreground">
{label}
</Text>
<Text class="m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground">
{caption}
</Text>
</Box>
<Progress value={(value == null ? undefined : String(value))} max="100" aria-label={label} />
{hint ? (
<Text class="m-0 text-xs font-medium text-muted-foreground">
{hint}
</Text>
) : null}
</Link>
) : (
<Box class="flex min-w-0 flex-col gap-2 p-2">
<Box class="flex items-baseline justify-between gap-4">
<Text class="m-0 min-w-0 truncate text-sm font-bold text-foreground">
{label}
</Text>
<Text class="m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground">
{caption}
</Text>
</Box>
<Progress value={(value == null ? undefined : String(value))} max="100" aria-label={label} />
{hint ? (
<Text class="m-0 text-xs font-medium text-muted-foreground">
{hint}
</Text>
) : null}
</Box>
)}
</Box>
);
}
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 meter-row// 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/parts/meter-row.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/link"
"github.com/ui8kit/codegen/generated/templ/ui/progress"
"github.com/ui8kit/codegen/generated/templ/ui/text"
uiutils "github.com/ui8kit/codegen/generated/templ/orgutils"
)
// MeterRowProps are the props of MeterRow; the values are the JSON shapes of the TypeScript props.
type MeterRowProps struct {
Label any `json:"label"`
Value any `json:"value"`
Caption any `json:"caption"`
Hint any `json:"hint"`
Href any `json:"href"`
Class string `json:"className"`
}
// A name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With `href` the whole row is a link.
templ MeterRow(p MeterRowProps) {
{{ vLabel := p.Label }}
{{ vValue := p.Value }}
{{ vCaption := p.Caption }}
{{ vHint := p.Hint }}
{{ vHref := p.Href }}
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv("min-w-0", p.Class)), Attrs: uiutils.Attrs("data-slot", "meter-row")}}) {
if uiutils.T(vHref) {
@compose.Link(compose.LinkProps{Variant: "block", LinkProps: link.LinkProps{Href: uiutils.URL(vHref, false), Class: "flex min-w-0 flex-col gap-2 rounded p-2 text-foreground no-underline hover:bg-muted"}}) {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "flex items-baseline justify-between gap-4"}}) {
@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: "m-0 min-w-0 truncate text-sm font-bold text-foreground"}}) {
{ uiutils.Text(vLabel) }
}
@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: "m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground"}}) {
{ uiutils.Text(vCaption) }
}
}
@compose.Progress(compose.ProgressProps{ProgressProps: progress.ProgressProps{Value: uiutils.SP(uiutils.Str(vValue)), Max: "100", Attrs: uiutils.Attrs("aria-label", vLabel)}})
if uiutils.T(vHint) {
@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: "m-0 text-xs font-medium text-muted-foreground"}}) {
{ uiutils.Text(vHint) }
}
}
}
} else {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "flex min-w-0 flex-col gap-2 p-2"}}) {
@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: "flex items-baseline justify-between gap-4"}}) {
@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: "m-0 min-w-0 truncate text-sm font-bold text-foreground"}}) {
{ uiutils.Text(vLabel) }
}
@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: "m-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground"}}) {
{ uiutils.Text(vCaption) }
}
}
@compose.Progress(compose.ProgressProps{ProgressProps: progress.ProgressProps{Value: uiutils.SP(uiutils.Str(vValue)), Max: "100", Attrs: uiutils.Attrs("aria-label", vLabel)}})
if uiutils.T(vHint) {
@compose.Text(compose.TextProps{TextProps: text.TextProps{Class: "m-0 text-xs font-medium text-muted-foreground"}}) {
{ uiutils.Text(vHint) }
}
}
}
}
}
}
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 meter-row{#- 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/parts/meter-row.json
A name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With `href` the whole row is a link.
Props (p): label, value, caption, hint, href, className. -#}
{%- set v_label = (p.label ?? null) -%}
{%- set v_value = (p.value ?? null) -%}
{%- set v_caption = (p.caption ?? null) -%}
{%- set v_hint = (p.hint ?? null) -%}
{%- set v_href = (p.href ?? null) -%}
{%- set c_11 -%}
{%- if og_t(v_href) %}
{%- set c_5 -%}
{%- set c_3 -%}
{%- set c_1 -%}
{{ og_text(v_label) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'class': 'm-0 min-w-0 truncate text-sm font-bold text-foreground', 'children': c_1}, with_context = false) }}
{%- set c_2 -%}
{{ og_text(v_caption) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'class': 'm-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground', 'children': c_2}, with_context = false) }}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'flex items-baseline justify-between gap-4', 'children': c_3}, with_context = false) }}
{{ include('compose/Progress.html.twig', {'value': og_s(og_str(v_value)), 'max': '100', 'attrs': og_attrs(['aria-label', v_label])}, with_context = false) }}
{%- if og_t(v_hint) %}
{%- set c_4 -%}
{{ og_text(v_hint) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'class': 'm-0 text-xs font-medium text-muted-foreground', 'children': c_4}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('compose/Link.html.twig', {'href': og_url(og_s(v_href)), 'variant': 'block', 'class': 'flex min-w-0 flex-col gap-2 rounded p-2 text-foreground no-underline hover:bg-muted', 'children': c_5}, with_context = false) }}
{%- else %}
{%- set c_10 -%}
{%- set c_8 -%}
{%- set c_6 -%}
{{ og_text(v_label) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'class': 'm-0 min-w-0 truncate text-sm font-bold text-foreground', 'children': c_6}, with_context = false) }}
{%- set c_7 -%}
{{ og_text(v_caption) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'class': 'm-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground', 'children': c_7}, with_context = false) }}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'flex items-baseline justify-between gap-4', 'children': c_8}, with_context = false) }}
{{ include('compose/Progress.html.twig', {'value': og_s(og_str(v_value)), 'max': '100', 'attrs': og_attrs(['aria-label', v_label])}, with_context = false) }}
{%- if og_t(v_hint) %}
{%- set c_9 -%}
{{ og_text(v_hint) }}
{%- endset -%}
{{ include('compose/Text.html.twig', {'class': 'm-0 text-xs font-medium text-muted-foreground', 'children': c_9}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': 'flex min-w-0 flex-col gap-2 p-2', 'children': c_10}, with_context = false) }}
{%- endif %}
{%- endset -%}
{{ include('compose/Box.html.twig', {'class': og_s(og_cnv(['min-w-0', (p.className ?? '')])), 'attrs': og_attrs(['data-slot', 'meter-row']), 'children': c_11}, 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 meter-row{* 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/parts/meter-row.json
A name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With `href` the whole row is a link.
Props (p): label, value, caption, hint, href, className. *}
{var $v_label = ($p['label'] ?? null)}
{var $v_value = ($p['value'] ?? null)}
{var $v_caption = ($p['caption'] ?? null)}
{var $v_hint = ($p['hint'] ?? null)}
{var $v_href = ($p['href'] ?? null)}
{capture $c_11}
{if og_t($v_href)}
{capture $c_5}
{capture $c_3}
{capture $c_1}
{=og_text($v_label)}
{/capture}
{=og_include('compose/Text.latte', ['class' => 'm-0 min-w-0 truncate text-sm font-bold text-foreground', 'children' => (string) $c_1])|noescape}
{capture $c_2}
{=og_text($v_caption)}
{/capture}
{=og_include('compose/Text.latte', ['class' => 'm-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground', 'children' => (string) $c_2])|noescape}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'flex items-baseline justify-between gap-4', 'children' => (string) $c_3])|noescape}
{=og_include('compose/Progress.latte', ['value' => og_s(og_str($v_value)), 'max' => '100', 'attrs' => og_attrs(['aria-label', $v_label])])|noescape}
{if og_t($v_hint)}
{capture $c_4}
{=og_text($v_hint)}
{/capture}
{=og_include('compose/Text.latte', ['class' => 'm-0 text-xs font-medium text-muted-foreground', 'children' => (string) $c_4])|noescape}
{/if}
{/capture}
{=og_include('compose/Link.latte', ['href' => og_url(og_s($v_href)), 'variant' => 'block', 'class' => 'flex min-w-0 flex-col gap-2 rounded p-2 text-foreground no-underline hover:bg-muted', 'children' => (string) $c_5])|noescape}
{else}
{capture $c_10}
{capture $c_8}
{capture $c_6}
{=og_text($v_label)}
{/capture}
{=og_include('compose/Text.latte', ['class' => 'm-0 min-w-0 truncate text-sm font-bold text-foreground', 'children' => (string) $c_6])|noescape}
{capture $c_7}
{=og_text($v_caption)}
{/capture}
{=og_include('compose/Text.latte', ['class' => 'm-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground', 'children' => (string) $c_7])|noescape}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'flex items-baseline justify-between gap-4', 'children' => (string) $c_8])|noescape}
{=og_include('compose/Progress.latte', ['value' => og_s(og_str($v_value)), 'max' => '100', 'attrs' => og_attrs(['aria-label', $v_label])])|noescape}
{if og_t($v_hint)}
{capture $c_9}
{=og_text($v_hint)}
{/capture}
{=og_include('compose/Text.latte', ['class' => 'm-0 text-xs font-medium text-muted-foreground', 'children' => (string) $c_9])|noescape}
{/if}
{/capture}
{=og_include('compose/Box.latte', ['class' => 'flex min-w-0 flex-col gap-2 p-2', 'children' => (string) $c_10])|noescape}
{/if}
{/capture}
{=og_include('compose/Box.latte', ['class' => og_s(og_cnv(['min-w-0', ($p['className'] ?? '')])), 'attrs' => og_attrs(['data-slot', 'meter-row']), 'children' => (string) $c_11])|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 meter-row{#- 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/parts/meter-row.json
A name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With `href` the whole row is a link.
Props (p): label, value, caption, hint, href, className. -#}
{%- set v_label = og_def(p['label'], none) -%}
{%- set v_value = og_def(p['value'], none) -%}
{%- set v_caption = og_def(p['caption'], none) -%}
{%- set v_hint = og_def(p['hint'], none) -%}
{%- set v_href = og_def(p['href'], none) -%}
{%- set c_11 -%}
{%- if og_t(v_href) %}
{%- set c_5 -%}
{%- set c_3 -%}
{%- set c_1 -%}
{{ og_text(v_label) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 min-w-0 truncate text-sm font-bold text-foreground'}, 'children': c_1}) }}
{%- set c_2 -%}
{{ og_text(v_caption) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground'}, 'children': c_2}) }}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'flex items-baseline justify-between gap-4'}, 'children': c_3}) }}
{{ og_include('compose/progress.html.j2', {'p': {'Value': og_s(og_str(v_value)), 'Max': '100', 'Attrs': og_attrs(['aria-label', v_label])}}) }}
{%- if og_t(v_hint) %}
{%- set c_4 -%}
{{ og_text(v_hint) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 text-xs font-medium text-muted-foreground'}, 'children': c_4}) }}
{%- endif %}
{%- endset -%}
{{ og_include('compose/link.html.j2', {'p': {'Href': og_url(og_s(v_href)), 'Variant': 'block', 'Class': 'flex min-w-0 flex-col gap-2 rounded p-2 text-foreground no-underline hover:bg-muted'}, 'children': c_5}) }}
{%- else %}
{%- set c_10 -%}
{%- set c_8 -%}
{%- set c_6 -%}
{{ og_text(v_label) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 min-w-0 truncate text-sm font-bold text-foreground'}, 'children': c_6}) }}
{%- set c_7 -%}
{{ og_text(v_caption) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 shrink-0 text-xs font-semibold tabular-nums text-muted-foreground'}, 'children': c_7}) }}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'flex items-baseline justify-between gap-4'}, 'children': c_8}) }}
{{ og_include('compose/progress.html.j2', {'p': {'Value': og_s(og_str(v_value)), 'Max': '100', 'Attrs': og_attrs(['aria-label', v_label])}}) }}
{%- if og_t(v_hint) %}
{%- set c_9 -%}
{{ og_text(v_hint) }}
{%- endset -%}
{{ og_include('compose/text.html.j2', {'p': {'Class': 'm-0 text-xs font-medium text-muted-foreground'}, 'children': c_9}) }}
{%- endif %}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': 'flex min-w-0 flex-col gap-2 p-2'}, 'children': c_10}) }}
{%- endif %}
{%- endset -%}
{{ og_include('compose/box.html.j2', {'p': {'Class': og_s(og_cnv(['min-w-0', og_def(p['className'], '')])), 'Attrs': og_attrs(['data-slot', 'meter-row'])}, 'children': c_11}) }}
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 name, a value caption and a progress bar (completeness by section, issues by rule, stock by warehouse). With `href` the whole row is a link.
| Prop | Type | Default | Description |
|---|---|---|---|
| label (required) | string | - | |
| value (required) | number | - | 0 to 100 |
| caption (required) | string | - | the caption on the right, e.g. "72%" |
| hint | string | - | |
| href | string | - |