Skip to content
Klarhimmel UI

App, pending invites

App, pending invites previewApp, pending invites preview

Install

npx shadcn add @klarhimmel/app-team-pending
DetailsAbout, usage, props and more

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

Import

Import

import Block from '@/components/klarhimmel/blocks/app-team-pending';
Also called
  • app/team-pending
About
Invites not yet accepted: address, role and when it was sent, with Resend and Revoke that name their invite.
Category
Interface sections for signed-in products. New project? Set it up once: /get-started/installation.

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.

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.

PropTypeDefaultDescription
eyebrowstring'Team'Text, up to 60 characters. Optional; empty is not rendered.
titlestring'Pending invites'Text, up to 120 characters.
descriptionstring'Say who is on this list and why.'Text, up to 300 characters. Optional; empty is not rendered.
invites{ email, role, sent }[]3 itemsList of 1 to 6. Each item: email, role, sent.
actions{ resend, revoke, question, yes, no }{…}Fields: resend, revoke, question, yes, no.
notices{ resent, revoked }{…}Fields: resent, revoked.
countWordstring'pending'Text, up to 20 characters.
state'filled' | 'empty''filled'One of 'filled', 'empty'.
messages{ emptyTitle, emptyBody }{…}Fields: emptyTitle, emptyBody.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.