Item
A row of content, alone or in a group that reads as a list. One that is a link or a button takes the rows' tint, and in a group one highlight glides from row to row, as in the Listbox and the Sidebar.
Examples
Variants
outline draws a border, for an item that stands on its own. muted fills it, to set it apart. default has neither, for items in a list.
Sizes
sm is as tall as a control with one line of text, and its description is small print, for lists of people or files.
Group
ItemGroup reads as a list, each item an entry of it. ItemSeparator draws a line between them.
Links
With render, an item is a link or a button. In a group, one highlight glides from item to item under the pointer and with the keyboard’s focus.
Media
ItemMedia shows an avatar as it is, an icon in a tile with variant="icon", or a picture cropped to a square with variant="image".
Header and footer
ItemHeader and ItemFooter each take a line of their own, above and below the rest.
Installation
npx shadcn@latest add https://kinoui.com/r/item.json- Files
components/kino/separator.tsxlib/reduce-motion.tslib/resize.tslib/run-progress.tslib/highlight.tscomponents/kino/item.tsx- Packages
@base-ui/reactclass-variance-authority- Global CSS
- the feels, the density tokens, the shape tokens and the success and warning colours
New to Kino? Installation covers what your project needs first and the @kino namespace.
API reference
Item
ItemMedia
Data attributes
Accessibility
ItemGroupis a list, and each item an entry of it, so a screen reader says how many there are.- An item that does something is a link (
<a href>) or a<button>, given withrender. Don’t put another link or button inside one: give a static itemItemActionsinstead. - A link can’t be disabled. Mark one
aria-disabled="true": it stays in the tab order so it is read, but a press or Enter does nothing, and the highlight leaves it. - The focus ring sits inside the item, so a list that scrolls never cuts it off.
- The media and the separators are hidden from screen readers. The title names the item.
- Muted text in an item under the highlight turns darker, so it keeps 4.5:1 on the tint.
- When the system asks for less motion, the highlight fades between items instead of gliding.
