Agent presence
Shows which row or card an agent is editing right now: an edge in its colour and a small label, read out politely.
| Candidate | Role | Interview | Invite |
|---|---|---|---|
TMTara Mendes | Product designer | ||
OHOmar Haddad | Frontend engineer | ||
LFLena Fischer | Data analyst | ||
PNPriya Nair | Product manager | Mon 13 Jan, 14:00 | |
DADiego Alvarez | Support lead | Wed 15 Jan, 11:00 |
- To
- Subject
Installation
npm i @uisatin/ui @uisatin/proimport '@uisatin/ui/styles.css'
import '@uisatin/pro/styles.css'
import { AgentPresence, useAgentPresence } from '@uisatin/pro/agent-presence'Part of Satin Pro, the licensed edition: @uisatin/pro on top of @uisatin/ui at the same version, its stylesheet after Free's. Satin Pro isn't on npm yet.
About 2.8 kB of JavaScript, minified and gzipped, on top of the @uisatin/uicomponents it uses (React aside).
First time with Satin? Set it up once, styles and fonts included, with the installation guide.
API Reference
The AgentPresence component (Satin Pro, @uisatin/pro/agent-presence) lays an edge in the agent's tone and a small label over target (a ref, an element or a selector) without touching it; render it inside the same position: relative box as the targets. label names the target for screen readers ("Hiring assistant is updating Tara Mendes"); activity is the step the agent is on ("Drafting invite…"), said on the label in place of its name. For a list, useAgentPresence() returns item(id) to spread on each row or card, start(id, label, activity?), done(), conflict(person), clear() and the props to spread on AgentPresence; it takes value, defaultValue and onValueChange. Parts: AgentPresenceRoot, AgentPresenceOutline, AgentPresenceLabel.
| Prop | Type | Default |
|---|---|---|
target | RefObject<Element>Elementstringnull | — |
agent | stringAgent | — |
label | string | — |
activity | string | — |
state | "working""done""conflict" | "working" |
person | string{ name, initials?, tone? } | — |
doneDuration | number | 1500 |
Accessibility
The edge and the label are hidden from screen readers; what they show is read out from a polite status region instead: "Hiring assistant is updating Tara Mendes" as the agent starts on a target or moves to the next, "Hiring assistant, Tara Mendes: Sending…" at each step when it says one (activity), "Hiring assistant updated Lena Fischer" when it's done, and "Jon Park is editing Omar Haddad; Hiring assistant is waiting" in a conflict (agentPresenceWorking, agentPresenceActivity, agentPresenceDone, agentPresenceConflict in SatinLabels). label names the target in those sentences, so give it the row's or card's name. Each state has its own words on the label, so colour is never the only cue, and a conflict's edge is dashed. It takes no focus and no pointer, and never changes the target, so nothing moves under it. Under reduced motion it neither fades nor glides and the mark stands still.
Something wrong or missing on this page?
Report a problemSuggest an improvement