# Item

> Source: https://design.nanatec.co.ke/components/item/
> A row that shows one thing — an icon, avatar or image, a title, a description and actions — on its own or in a list, and opens it when clicked.

An item is one row: a policy, a person, a file, a setting. It sets out a picture, a title and
a line about it, with actions at the end, and lines up with the items around it. For rows
of data with columns, use the [table](/components/table/); for a block with its own header
and body, the [card](/components/card/).

## Preview

## Installation

```html
<nana-item-group label="Policies" divided>
  <nana-item title="Motor comprehensive" description="KDA 123A" href="/policies/42">
    <nana-icon slot="media" name="truck"></nana-icon>
    <nana-button slot="actions" size="sm" variant="ghost">Renew</nana-button>
  </nana-item>
</nana-item-group>
```

Content in the default slot shows under the description.

## Opening the row

With `href`, the title becomes a link stretched over the whole row, so a click anywhere on it
opens the item, and the row tints on hover and presses in slightly. The actions sit above
the link and do their own thing. Keyboard users reach the link and then each action, in
order. A disabled item dims, and its link stays announced but goes nowhere.

## Looks and sizes

| Variant | Use |
| --- | --- |
| `default` | No border or fill; for rows in a divided group or a panel |
| `outline` | A light border on the surface, for an item on its own |
| `muted` | A tinted fill, for an item that sits back |

`size` is `md` or the denser `sm`. The media box is sized for an icon by default; set the
media to `avatar` to let an avatar keep its own size, or `image` to fill the box with a
picture.

## Groups

A group is a list, named by `label`, and its items are its list items. Items are spaced
apart; with `divided` they are joined in one outlined box with a line between each.

## Accessibility

- A group is a `list` named by `label`, and each item in it a `listitem`, so screen readers
  say how many there are.
- The title is the link's name, so it should say what opens: "Motor comprehensive", not
  "View".
- Actions are separate buttons, never inside the link; name an icon-only action, as in
  "Renew motor comprehensive".
- Media is decoration unless it says something the title does not; an avatar with a name
  already has one.

## API
