ApprovedByMark
ExperimentalA small mark that says who said yes to an action.
Also known as approved by, sign off mark
Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.
The four kinds
<ApprovedByMark by="you" />
<ApprovedByMark by="check" />
<ApprovedByMark by="rule" />
<ApprovedByMark by="none" />Each kind has its own icon and words. 'Nobody asked' is shown plainly so auto mode is never hidden.
When to use it
Says who allowed an action: the person, an automatic check, a saved rule, or nobody. It always pairs an icon with words, so people can tell their own approval from a machine's without relying on color.
Made of: Icon · Words · Extra detail (optional, in the tooltip)
Use it for
- Beside each action in a log or history.
- On a finished step, to show whether a person or a rule let it run.
- Making auto mode visible with the words "Nobody asked".
Do and avoid
Do
- Show it on every action that needed or skipped an approval.
- Keep the words visible next to the icon.
- Say 'Nobody asked' when auto mode skipped the question.
- Add detail naming the saved rule when you can.
Avoid
- Don't use color alone to tell the kinds apart.
- Don't show 'You approved' for something an automatic check approved.
- Don't hide the mark to save space. Let it wrap instead.
- Don't use amber for it. It is a record, not a request.
On a phone
- It is one short line of small text that wraps inside its container instead of cutting off.
- The detail text shows as a tooltip on hover only, so on a phone it is read aloud by screen readers but never shown.
- Keep the label words short, because the mark has no tap action.
Seen in products
- Claude Code auto mode: a separate model reviews each action and blocks risky ones, so a classifier can stand in for a person's approval.
- Claude Code approvals can be remembered as saved rules, so some actions run with no new question.
- Claude Code never auto-approves some actions in any mode, so a person must still say yes to those.
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
| byrequired | "you" | "check" | "rule" | "none" | none | Who approved the action. none means nobody was asked (auto mode). |
| labels | Partial<Record<ApprovedBy, string>> | none | Replace the visible words for one or more kinds. |
| detail | string | none | Extra plain detail. Set as the tooltip and added as screen reader text. |
| className | string | none | Extra classes on the span. |
"Show code under the preview gives the code for the example on the stage."
In Figma
In Figma, one ApprovedByMark switches all of this from its properties panel, across 4 variants. Each property sets the React prop beside it, so design and code use the same names.
| Figma property | React | Values |
|---|---|---|
| By | by | You, Check, Rule, None |
States
States this part has beyond its default look. Build each one your screen can reach. States set by a property are in the Code tab.
- you
- Set by to you for a tick and the text You approved.
- check
- Set by to check for a shield and the text Automatic check approved.
- rule
- Set by to rule for a bookmark and the text Allowed by a saved rule.
- none
- Set by to none for a loop icon and the text Nobody asked (auto mode).
- detail
- Pass detail to add a tooltip and extra text for screen readers.
Tokens
Change one of these and every part that uses it follows.
--fg-muted
Built in
- The words are always on screen. The icon is hidden from screen readers.
- Extra detail is read by screen readers after the words, and shows as a tooltip on hover.
- It is plain text, so it zooms and wraps with the page.
What you need to do
- Put anything people must see in the visible words, not only in detail: the tooltip appears only on mouse hover.
- Pass labels in the person's language when your app is not in English.
Built toward WCAG 2.2 AA and checked automatically; no independent audit yet. Read the accessibility guide