# PostByline

> Who wrote a post and when, as pieces a caller arranges: a portrait, the author's name and a facts line of dates, reading time and any other fact, separated by middots.

```ts
import { PostByline } from "@sdxc/ui/blog";
```

Renders the byline: a `.Portrait` beside the `.Author` and `.Facts` stacked and centred on
it, or the text alone without one. Every date inside reads `locale` and `dateStyle`.

## Examples

```tsx
<PostByline>
	<PostByline.Portrait initials="AP" />
	<PostByline.Author href="/about">Ada Park</PostByline.Author>
	<PostByline.Facts>
		<PostByline.Date date="2026-11-12" />
		<PostByline.Minutes minutes={8} />
	</PostByline.Facts>
</PostByline>
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `locale?` | `string` |  |
| `dateStyle?` | `"long" \| "medium" \| "short"` |  |

Also accepts everything in `TagProps<"div">`.


### PostByline.Portrait

The author's picture: an avatar from `image` or `initials`, or the children in its place, such as a framed photo or a drawn mark.

| Prop | Type | Description |
| --- | --- | --- |
| `image?` | `string` | The avatar's address; the name beside it describes it, so it carries empty alt text. |
| `initials?` | `string` | Shown in the avatar when there is no `image`, or while it loads. |

Also accepts everything in `TagProps<"span">`.


### PostByline.Author

The author's name, a link to their page with `rel="author"` when given an `href`.

| Prop | Type | Description |
| --- | --- | --- |
| `href?` | `string` | The author's page, which the name links to with `rel="author"`. |

Also accepts everything in `TagProps<"p">`.


### PostByline.Facts

The facts as one wrapping line, each child element an item and every item after the first led by the separator, which stays with the fact it introduces when the line wraps.

Also accepts everything in `TagProps<"p">`.


### PostByline.Date

The publish day as a `<time>` in the byline's locale, after the children, such as a word like "Planted".

| Prop | Type | Description |
| --- | --- | --- |
| `date` | `string` | The day, `YYYY-MM-DD`. |

Also accepts everything in `TagProps<"span">`.


### PostByline.Updated

The day the post last changed as a `<time>`, after the children, "Updated" by default.

Takes no props of its own.

### PostByline.Minutes

The reading time: the minute count, then the children, "min read" by default.

| Prop | Type | Description |
| --- | --- | --- |
| `minutes` | `number` | Reading time in whole minutes. |

Also accepts everything in `TagProps<"span">`.


### PostByline.Fact

Any other fact on the line, such as a badge or a word count, led by the separator like the dates.

Also accepts everything in `TagProps<"span">`.


## Types

| Name | Values | What it decides |
| --- | --- | --- |
| `DateStyle` | `"long" \| "medium" \| "short"` | How long a formatted day reads. |

## Also exported

- `formatDay`
