# RankedList

> A numbered list of things ranked by a figure, such as the most read posts, the top pages or a leaderboard: each row its rank, a label that may wrap, and the figure held to the end.

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

Renders the list: an `<ol>` of RankedList.Items with the markers drawn by each row,
so the rank, label and figure line up in columns. Restyle the rows through
RankedList.CustomProperties on the list.

## Examples

```tsx
<RankedList>
	<RankedList.Item>
		<RankedList.Label href="/posts/caching">Caching, briefly</RankedList.Label>
		<RankedList.Value>775</RankedList.Value>
	</RankedList.Item>
</RankedList>
```

```tsx
<RankedList numbered={false}>…</RankedList>
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `numbered?` | `boolean` | Draws each row's rank before its label; `false` keeps the order and drops the numbers. |

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


### RankedList.Item

One row: its rank from the list's counter in muted tabular numerals, then the RankedList.Label and the RankedList.Value at the end, in whichever order they are written.

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


### RankedList.Label

What is ranked, a link to it when given an `href`; it wraps onto as many lines as it needs beside the figure, never pushing it out of the row.

Takes no props of its own.

### RankedList.Value

The figure the row is ranked by, held to the row's end on one line in muted tabular numerals, so figures of one magnitude line up down the list.

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

