# Author

> Compact byline that attributes content to any author: name, avatar (URL or path), optional profile link, and a localized or custom byline prefix; the fuller biography treatment is AuthorBio.

- Status: stable
- Group: structure
- Page: https://www.digitaltableteur.com/design-system/components/author
- Contract: https://www.digitaltableteur.com/contracts/v1/Author.contract.json

## When to use

Compact byline attribution (author identity) for blog posts. For the fuller end-of-article treatment use AuthorBio.

## When not to use

- Do not use Author for a full biography or social-link block; use AuthorBio instead.
- Do not render an unlabelled avatar when the author's identity is not also available as text.

## Look-alikes

- AuthorBio: Do not use Author for a full biography or social-link block; use AuthorBio instead.

## Props

| Prop | Type | Default | Description | Required |
| --- | --- | --- | --- | --- |
| `name` | `string` | none | Author name shown after the byline prefix; also names the avatar and feeds its initials fallback. | Yes |
| `imageUrl` | `string \| { default: string } \| StaticImageData` | none | Avatar image source: a URL, an imported asset path, or static image data. When absent the avatar falls back to initials from `name`. | No |
| `size` | `AvatarSize` | `md` | Avatar size, exposed from the Avatar atom: token sizes `sm`/`md`/`lg`/`xl` are canonical; any CSS length string is passed through. Defaults to `md`. | No |
| `profileUrl` | `string` | none | Optional author profile URL; makes the byline text a link. | No |
| `bylinePrefix` | `string` | none | Byline prefix before the name. Defaults to the localized "By" (fi "Kirjoittanut", sv "Av"), matching the native dt-author element. | No |

## Variants

- Available sizes: `sm`, `md`, `lg`, `xl` (default `md`).

## Invalid combinations

The contract records no invalid combinations.

## Keyboard

The contract records no keyboard interaction.

## Rules

Every item under When not to use is a MUST NOT. MUST and SHOULD follow RFC 2119.

| Level | Rule | How it is checked |
| --- | --- | --- |
| MUST | Required stories produce no axe violations at the configured severity. | Automated by `npm run test:stories:matrix:ci`. WCAG 2.5.8. |
| MUST | The accessibility tree (role, name, state) matches the committed snapshot for every required story. | Automated by `npm run test:stories:matrix:ci`. WCAG 1.3.1, 4.1.2. |
| MUST | The component remains legible and operable under a real browser forced-colors: active pass. | Automated by `npm run test:stories:hc`. |
| MUST | A human completed an end-to-end accessibility review of this component. | Manual review, last on 2026-11-04. |
| SHOULD | Place Author beside publication metadata near the article title. | Not stated in the contract. |
| SHOULD NOT | Do not repeat a biography in the compact byline; compose AuthorBio later in the article. | Not stated in the contract. |

## Install and import

- Install: `npm install @digitaltableteur/react` (version 0.9.1, restricted access on npm).
- Import: `import { Author } from "@digitaltableteur/react";`
- Entry point: `@digitaltableteur/react/identity` exports it too.
- Styles: import `@digitaltableteur/react/style.css` once at the app boundary.
- Also available as the custom element `<dt-author>`; see the custom elements manifest.

## Links

- Machine-readable contract (Design System Contract 1.0): https://www.digitaltableteur.com/contracts/v1/Author.contract.json
- Markdown version of this page: https://www.digitaltableteur.com/design-system/components/author.md
- Component index as JSON: https://www.digitaltableteur.com/design-system/components.json
- All components: https://www.digitaltableteur.com/design-system/components
- Source: The implementation lives in a private repository. This page, its Markdown twin and the contract are generated from it at build time and are the public source of truth.
