Skip to content

Item

partialkit

Components for plain HTML.

<div class="item" data-variant="outline">
<div class="item-media"></div>
<div class="item-content">
<span class="item-title">partialkit</span>
<p class="item-description">Components for plain HTML.</p>
</div>
<div class="item-actions">
<button class="btn btn-outline btn-sm">Open</button>
</div>
</div>
ClassPart
.itemThe row
.item-groupSeveral rows, spaced by size
.item-mediaIcon or image at the leading edge
.item-contentTitle and description
.item-titleOne line, clamped
.item-descriptionTwo lines, clamped
.item-actionsControls at the trailing edge
.item-header / .item-footerFull-width rows above and below
.item-separatorA rule between rows
AttributeMeaning
data-variant="outline"A visible border
data-variant="muted"A filled surface
data-size="sm" / "xs"Tighter rows, and a smaller image
Plain
Outline
Muted
Default

Two lines, with room to breathe.

Small

Tighter.

Extra small

Tightest.

Put the classes on an <a> and the whole row navigates, with a hover surface to say so.

Set dir="rtl" on the page or on any subtree — media and actions swap ends on their own. See the button page for a live example.

  • A list of items is a list. Wrap them in <ul>/<li> when they are one, so the count is announced and the rows can be navigated as a group.
  • Titles are clamped, not shortened. line-clamp hides overflow visually while the full text stays in the accessibility tree, which is the right way round — but a title that always overflows is a sign the layout needs the room, not the clamp.
  • The media is decoration unless it carries information. Give a decorative icon aria-hidden="true", and an avatar its person’s name.