# Actor

Who did something, one way everywhere: a person by their picture and name, an agent named first with its person quieter after it.

Live variants: https://design.arcadia.is/components/actor

```tsx
import { ActorName } from "@arcadia/ui";
```

```tsx
import { Avatar, ActorName } from "@arcadia/ui";

<div {...sx("actor-record", page.record)}>
  <p {...sx("actor-line", page.line)}>
    <Avatar {...scout} alone aria-hidden size={20} />
    <span><ActorName actor={scout} /> moved CREW-12 to Doing</span>
    <time {...sx("actor-when", page.when)}>14:02</time>
  </p>
  <p {...sx("actor-line", page.line)}>
    <Avatar {...person} aria-hidden size={20} />
    <span><ActorName actor={person} /> gave it to <ActorName actor={scout} /></span>
    <time {...sx("actor-when", page.when)}>13:40</time>
  </p>
  <p {...sx("actor-line", page.line)}>
    <Avatar {...scoutForAda} alone aria-hidden size={20} />
    <span><ActorName actor={scoutForAda} lines={1} /> opened CREW-12</span>
    <time {...sx("actor-when", page.when)}>13:38</time>
  </p>
</div>
```

## Accessibility

Where `ActorName` stands beside an `Avatar`, as in the record above, hide the picture with `aria-hidden` so the name is heard once, unless it shows presence.

`ActorName` reads "Scout, for maya": a comma clipped out of sight gives a reader the pause the eye takes from the change of style, and a copy keeps it. Its quiet half is the third rank of ink, which clears 4.5:1 on every surface.

With `href` the name is one link, named by the name alone, and the picture beside it is no second stop. An agent's person is a stop of its own only with `noteHref`.

A removed actor reads "Scout, for maya, removed" or "Ada, removed": the same comma gives the pause the eye takes from the change of style. With `removed` the name is no link, so it is no tab stop either.

Someone outside reads "Grace Hopper, grace.hopper.1906@navy-archive.example, Outside", or the address and Outside alone. Nothing of it is a stop: there is no page here to lead to.

## API reference

### ActorName

- `actor` (`Actor | OutsideActor`, required): Who: a person, an agent with the person it acts for, or someone outside Arcadia (a mail's sender): the name their server gave then the address, or the address alone, then the quiet mark "Outside", so nobody takes them for an account here.
- `size` (`"sm" | "md" | "lg"`, default `"md"`): The style the name stands in, at its bold: `sm` Caption (an author line, a byline), `md` Body (a row, a cell, a sentence), `lg` Headline. An agent's "for maya" follows one style smaller: Body under Headline, Caption under Body, and Caption under Caption.
- `host` (`string`): The app an agent goes by outside Arcadia ("claude.ai"), its name then a step quieter, as Crew shows an agent of an outside client. One already inside its name is not repeated.
- `href` (`string`): Their page: the name itself is the link. A removed actor's name is never a link.
- `linkStyle` (`"quiet"`)
- `noteHref` (`string`): An agent's person's page. Not a link either on a removed agent's name.
- `removed` (`boolean`, default `false`): An actor that was removed: what they wrote stays under their last name, and the quiet mark "removed" follows the name (and an agent's "for maya"), one style smaller, in the quietest ink. A reader hears "Scout, for maya, removed". Someone outside Arcadia is never removed, so it has no effect there.
- `lines` (`number`): The lines an agent's name may take where its box is short, its person never the part that goes. At 1 the name and "for maya" share the line and the name fades first; at 2 or more "for maya" keeps the last line and the name fades in the lines above it. "for maya" fades at its own end only for a person's name too long for a line. A `ListRow`'s label gives 1. Without it the name wraps whole.
- `rootStyle` (`RootStyle<ActorNameKnobs>`): Typed StyleX override: layout and the `--actor-name-*` knobs.

Rest props go to `HTMLAttributes<HTMLSpanElement>`.
