Agent suggestion
Something the agent prepared, an email, a meeting or a CRM update, for the user to approve.
Installation
npm i @uisatin/uiimport { AgentSuggestion } from '@uisatin/ui/agent-suggestion'About 14.0 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.
npx shadcn@latest add https://uisatin.dev/r/agent-suggestion.json https://uisatin.dev/r/avatar.json https://uisatin.dev/r/button.jsonAdds agent-suggestion.tsx, avatar.tsx, badge.tsx, button.tsx, kbd.tsx, labels.tsx, progress.tsx, spinner.tsx and tooltip.tsx to components/ui and installs iconoir-react.
First time with Satin? Set it up once, styles and fonts included, with the installation guide.
API Reference
The AgentSuggestion component is a card around something the agent prepared: its kind, who it concerns, a title and text, any content of its own and the actions that carry it out. AgentSuggestionQuote, AgentSuggestionMetric, AgentSuggestionDiff and AgentSuggestionChanges cover the usual bodies; AgentSuggestionChangeValue draws the from → to of one change, for a row with controls of its own.
| Prop | Type | Default |
|---|---|---|
kind | ReactNode | — |
icon | ReactNode | — |
meta | ReactNode | — |
title | ReactNode | — |
description | ReactNode | — |
actions | ReactNode | — |
children | ReactNode | — |
AgentSuggestionQuote | { from, avatar?, children } | — |
AgentSuggestionMetric | { value, unit?, used?, max? } | — |
AgentSuggestionDiff | { before, after } | — |
AgentSuggestionChanges | { changes: { field, from?, to }[] } | — |
AgentSuggestionChangeValue | { from?, to } | — |
className | string | — |
ref | Ref<HTMLElement> | — |
...props | ComponentProps<'section'>Other attributes go to <section> | — |
Accessibility
A section, labelled by title when there is one, so it is a region landmark. In AgentSuggestionDiff the old text is a del and the new an ins, read as "Remove:" and "Add:". AgentSuggestionChanges is a description list with the arrows hidden, and AgentSuggestionMetric’s bar is a Progress named by unit. The actions are your own buttons; name them by what they do ("Send email").
Something wrong or missing on this page?
Report a problemSuggest an improvement