Domain

ApprovalGroup

One bordered group of compact approval rows under a heading such as "2 approvals waiting", for two or more approvals that wait together.

import { ApprovalGroup } from '@lostgradient/cinder';
approvalgroup
01

Overview

Two or more approvals waiting together, as one bordered group of compact rows under a heading such as "2 approvals waiting". Each row is an ApprovalCard in the row layout, which gives up its own border inside the group, so the group is the only box.

Usage

svelte
<script lang="ts">
  import { ApprovalCard, ApprovalGroup, type ApprovalCardProps } from '@lostgradient/cinder';

  let { approvals }: { approvals: ApprovalCardProps[] } = $props();
</script>

<ApprovalGroup heading={`${approvals.length} approvals waiting`}>
  {#each approvals as approval (approval.idempotencyKey)}
    <div>
      <ApprovalCard {...approval} layout="row" />
    </div>
  {/each}
</ApprovalGroup>
02

When to use

Use when
  • Two or more tool approvals wait on the same person at once, such as a batch an agent asked for in one turn.
Avoid when
  • A single approval waits: draw one ApprovalCard in the `decision` layout on its own.
03

Props

Props for approval-group
Name
Type
Default
Description
heading required text The group's heading, which also names it, such as 2 approvals waiting. Written at the top of the one bordered surface the rows share.
headingLevel 23456 3 The heading's level, so the group slots into the page's outline. Default 3.
children required snippet The rows: ApprovalCards in the row layout, each in an element of its own. They lose their own border and stand one inset separator apart on the group's surface.