Pass the names. Put a NameListEmpty inside for the words that show when the list is empty.
liked-by.tsx
NameList
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| items | readonly NameListItem[] | — | The names, in the order they read. |
| max | number | 2 | The most names that show before "N others". Default 2. |
| type | "and""or" | — | and (default: "Ana and Ben") or or ("Ana or Ben"). |
| length | "long""narrow""short" | — | The join words of Intl.ListFormat: long (default, "and"), short ("&"), narrow. |
| rest | "none""popover" | "popover" | popover (default): the rest is a button that opens a Popover with the other names. none: plain text ("3 others"), for a place with no room for a popup (a Toast, a row that is a link). |
| labels | Partial<NameListLabels> | — | The words (NameListLabels). Keep the object and its functions stable (module level). |
| render | — | Renders one name: a link, an Avatar and a name, a Hover Card. Default: the label in weight 600. The rest Popover renders its names with it too. | |
| children | ReactNode | — | A NameListEmpty part: the words of no value. With a value, they are not drawn. |
| locale | string | — | The BCP 47 locale. Default: the DisplayLocaleProvider locale, else "en-US". |
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
NameListEmpty
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| data-slot | string | — | The data-slot of the root: the item's own slot ("time-ago"). Default "empty-value". |
From Base UIUseRenderBase UI docs | |||
| render | — | Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render. | |
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
| Tab | Moves to the rest button. |
|---|---|
| Enter | Opens the Popover with the other names. |
| Space | Opens the Popover with the other names. |
| Escape | Closes the Popover. |
Built with
Installs with Name List
- Components
- Popover



