# Pending invites

- **[App UI](/app/)**
- **[Team](/app/team/)**
- **Pending invites**

Invites not yet accepted: address, role and when it was sent, with Resend and Revoke that name their invite.

## Notes

- **When to use it**: The list of invitations that have been sent but not accepted, with Resend and Revoke. It follows `app-team-invite` and sits next to `app-team-members`; once someone accepts, they belong in the members list instead.
- **Writing for it**: - Each invite shows an email (60), a role (20) and a sent text (30). Write sent as a phrase, like 'Sent 2 days ago', since the block does not compute dates.
- The Revoke question is spoken with the address after it, so write actions.question as a phrase that ends in 'for', and keep it to 40 characters.
- notices.resent and notices.revoked (40 each) are followed by the address, so end them with a word that leads into it, such as 'to' or 'for'.
- **Watch out for**: Resend and Revoke change only what is shown. Revoking removes the row from the list on screen, and the pending count drops with it. Between 1 and 6 invites are allowed, and the empty state needs an emptyTitle.

## Pairs well with

- **[App, invite form](/blocks/app/team-invite)**
- **[App, member list](/blocks/app/team-members)**
- **[App, danger zone](/blocks/app/settings-danger)**

## Usage

The block in a page, with its default content (long lists shortened). Every prop is in the table below.

section.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { BlockSurface } from '@/components/klarhimmel/blocks/surface';
import AppTeamPending from '@/components/klarhimmel/blocks/app-team-pending';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <AppTeamPending props={{
          "eyebrow": "Team",
          "title": "Pending invites",
          "description": "Say who is on this list and why.",
          "invites": [
            {
              "email": "first@example.com",
              "role": "Member",
              "sent": "Sent 0 days ago"
            },
            {
              "email": "second@example.com",
              "role": "Viewer",
              "sent": "Sent 0 days ago"
            },
            {
              "email": "third@example.com",
              "role": "Admin",
              "sent": "Sent just now"
            }
          ],
          "actions": {
            "resend": "Resend",
            "revoke": "Revoke",
            "question": "Revoke the invite to",
            "yes": "Yes, revoke",
            "no": "Keep"
          },
          "notices": {
            "resent": "Say it was sent again to",
            "revoked": "Say it was cancelled for"
          },
          "countWord": "pending",
          "state": "filled",
          "messages": {
            "emptyTitle": "Say none are waiting",
            "emptyBody": "Say what makes an invite appear here and for how long."
          }
        }} />
      </BlockSurface>
    </Theme>
  );
}
```

## Props

The type, default and text limit of every prop. On a real page, over-limit text is kept and checkSections flags it (Installation, Check a page before you ship); this live preview shows the default until it fits. The panel above edits all props.

- **eyebrow**: Text, up to 60 characters. Optional; empty is not rendered.
- **title**: Text, up to 120 characters.
- **description**: Text, up to 300 characters. Optional; empty is not rendered.
- **invites**: List of 1 to 6. Each item: email, role, sent.
- **actions**: Fields: resend, revoke, question, yes, no.
- **notices**: Fields: resent, revoked.
- **countWord**: Text, up to 20 characters.
- **state**: One of 'filled', 'empty'.
- **messages**: Fields: emptyTitle, emptyBody.
- **headingLevel**: One of '1', '2'. Optional; empty is not rendered.

## Install

- **CLI**

  ```
  npx shadcn add @klarhimmel/app-team-pending
  ```

Uses

- Badge
- Button
- EmptyState

- **About**: Invites not yet accepted: address, role and when it was sent, with Resend and Revoke that name their invite.
- **States**: Filled and empty. Resend and Revoke name their invite; revoking removes the row and says so in a live region. New project? Set it up once: /get-started/installation.
