Skip to content
Klarhimmel UI

Assistant showcase

App, assistant showcase previewApp, assistant showcase preview

Install

npx shadcn add @klarhimmel/app-assistant-showcase
DetailsAbout, usage, props and more

Heading and link beside a mock assistant: thread, tool call, an approval with a recommended option, and a composer. A fixture UI, not interactive.

Notes

When to use it

A marketing section that shows what an assistant looks like in use: heading and link on one side, a mock conversation with a tool call, an approval and a composer on the other. For a real, usable conversation use app-assistant-thread instead; this one is a fixture.

Writing for it

- The thread takes 1 to 4 messages of 200 characters each. Two or three short turns read better than a full chat, so let the last assistant message lead into the approval below. - The approval holds 1 to 3 options of 80 characters, and each one carries a recommended flag. Mark one option, because the Recommended badge is what the picture is meant to sell. - The tool line has a label (40), a detail (80) and a status (20); keep the detail to a real-sounding argument rather than a description of the tool.

Watch out for

None of the panel's buttons are focusable and nothing in it responds to a click, by design. Do not use it where a visitor is expected to try the controls, and note that the word Recommended on the badge is fixed text, not a field you can reword.

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 AppAssistantShowcase from '@/components/klarhimmel/blocks/app-assistant-showcase';

export default function Section() {
  return (
    <Theme theme="brand">
      <BlockSurface>
        <AppAssistantShowcase props={{
          "eyebrow": "Assistant",
          "title": "Name the screens the assistant works in",
          "description": "Say in one or two sentences what the thread, the composer and the approvals let people do, and what they have in common.",
          "link": {
            "label": "Say where the link goes",
            "href": "#assistant"
          },
          "thread": [
            {
              "role": "user",
              "text": "Write what a person asks the assistant to do."
            },
            {
              "role": "assistant",
              "text": "Say what the assistant found and the options it sees."
            }
          ],
          "tool": {
            "label": "Name a tool call",
            "detail": "Name the inputs it read",
            "status": "Done"
          },
          "approval": {
            "title": "Say what the person is asked to choose",
            "options": [
              {
                "label": "Name the recommended option",
                "recommended": true
              },
              {
                "label": "Name the other option",
                "recommended": false
              }
            ],
            "actions": [
              "Approve A",
              "Choose B",
              "Ask a question"
            ]
          },
          "composer": {
            "placeholder": "Say what to ask…",
            "attach": "File",
            "send": "Send"
          }
        }} />
      </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'Assistant'Text, up to 60 characters.
titlestring'Name the screens the assistant work…'Text, up to 120 characters.
descriptionstring'Say in one or two sentences what th…'Text, up to 300 characters.
linkLink{…}See the type.
thread{ role, text }[]2 itemsList of 1 to 4. Each item: role ('user' | 'assistant'), text.
tool{ label, detail, status }{…}Fields: label, detail, status.
approval{ title, options, actions }{…}Fields: title, options, actions.
composer{ placeholder, attach, send }{…}Fields: placeholder, attach, send.
headingLevel'1' | '2'-One of '1', '2'. Optional; empty is not rendered.

Other states

The states of every assistant component, side by side.

Install

Installs

app-assistant-showcase
Uses
  • Button
  • Badge
States
Fixture conversation, a finished tool call and an approval with a recommended option. New project? Set it up once: /get-started/installation.