@molecule/app-list-item-row-solid

Feature · list-item-row · App (browser) · v1.2.2 · Apache-2.0

Thumbnail + title + subtitle + metadata + actions row (nav lists, mobile menus)

npm install @molecule/app-list-item-row-solid

npm · Source on GitHub

How it works

@molecule/app-list-item-row-solid is a ready-made list-item-row feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.

import { ListItemRow } from '@molecule/app-list-item-row-solid'

;<ListItemRow
  title="Project Alpha"
  subtitle="Last edited 2 hours ago"
  metadata="3 collaborators · 12 files"
  leading={<img src="/icons/folder.svg" alt="" width={32} height={32} />}
  actions={<button onClick={() => openMenu('alpha')}>Menu</button>}
  onClick={() => navigate('/projects/alpha')}
/>

Works with: @molecule/app-solid, @molecule/app-ui, @molecule/app-ui-solid

Reference

Solid generic list-item row.

Exports <ListItemRow> — leading slot (icon/avatar/thumbnail) + up to three text lines (title / subtitle / metadata) + right-side actions. Props: title, subtitle?, metadata?, leading?, actions?, onClick?, selected?, disabled?, density? ('comfortable' default | 'compact'), className?. Use for nav lists, mobile menus, search results, picker dialogs, inbox threads. For table rows use <RowWithActions> from @molecule/app-data-table-ui-solid instead — this component is not a <tr>. It is the Solid counterpart of @molecule/app-list-item-row-react: same props and the same DOM for the same input.

Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit src/index.ts JSDoc, not this file.

Quick Start

import { ListItemRow } from '@molecule/app-list-item-row-solid'

;<ListItemRow
  title="Project Alpha"
  subtitle="Last edited 2 hours ago"
  metadata="3 collaborators · 12 files"
  leading={<img src="/icons/folder.svg" alt="" width={32} height={32} />}
  actions={<button onClick={() => openMenu('alpha')}>Menu</button>}
  onClick={() => navigate('/projects/alpha')}
/>

Type

feature

Installation

npm install @molecule/app-list-item-row-solid @molecule/app-solid @molecule/app-ui @molecule/app-ui-solid solid-js

API

Interfaces

ListItemRowProps

Props accepted by the ListItemRow component.

interface ListItemRowProps {
  /** Title — first line. */
  title: JSX.Element
  /** Optional second line (excerpt, description). */
  subtitle?: JSX.Element
  /** Optional third line (metadata — timestamps, counts, tags). */
  metadata?: JSX.Element
  /** Optional leading slot — icon, avatar, thumbnail image. */
  leading?: JSX.Element
  /** Optional right-side actions (buttons, action menu). */
  actions?: JSX.Element
  /** Loaded boolean action rendered as its own native button, independently of read-only metadata. */
  toggle?: OptimisticToggleButtonProps
  /**
   * Called when the row is activated. The whole row is clickable through a
   * transparent native button over it, named by the title; the inner controls
   * (the `actions` slot) sit above it and keep their own clicks.
   */
  onClick?: () => void
  /** When true, sets `aria-current="true"` on the row — no built-in visual highlight; style it via `className` or host CSS. */
  selected?: boolean
  /** When true, renders in a disabled visual state. */
  disabled?: boolean
  /** Dense vs comfortable spacing. Defaults to `'comfortable'`. */
  density?: 'comfortable' | 'compact'
  /** Extra classes. */
  className?: string
}

Functions

ListItemRow(props)

Generic "thumbnail + text + actions" row — used everywhere: navigation lists, mobile menus, inbox-style threads, search results, picker dialogs, bookmark lists, etc.

With onClick the whole row is clickable through a transparent native button over it, named by the title (aria-labelledby); Enter / Space on that button run the same handler a click anywhere on the row runs, and the inner controls (the actions slot) sit above the button and keep their own clicks.

function ListItemRow(props: ListItemRowProps): JSX.Element
  • props — Component props (see ListItemRowProps).

Returns: The rendered list-item row.

Injection Notes

Requirements

Peer dependencies:

  • @molecule/app-solid ^3.14.0 || ^4.0.0
  • @molecule/app-ui ^1.0.1
  • @molecule/app-ui-solid ^1.1.0
  • solid-js ^1.8.0

Runtime Dependencies

  • @molecule/app-solid

  • @molecule/app-ui

  • @molecule/app-ui-solid

  • solid-js

  • selected only sets the aria-current="true" attribute — no built-in highlight. Pass a highlight class via className (or target [aria-current="true"] in host CSS) to make selection visible.

  • With onClick the whole row is clickable through a transparent native button over it, named by the title (aria-labelledby); Enter / Space on that button run the same handler a click anywhere on the row runs, and the inner controls (the actions slot) sit above the button and keep their own clicks.

  • disabled halves the opacity and disables the open button (no pointer cursor, no activation); there is no data-mol-id prop.

  • Styling resolves through getClassMap() — wire a ClassMap bond first.