Veil UI
Components

List Item

A re-export of the List View item primitive.

Installation

$ npx veil-ui@latest add list-item

Usage

import { ListView } from "@/components/ui/list-view";
import { ListItem } from "@/components/ui/list-item";

<ListView label="Queue">
  <ListItem title="Review pull request" description="Assigned to you" />
</ListView>;

Examples

Basic

  • Review pull request
    Assigned to you
  • Update changelog
    Due tomorrow

Members

  • MC
    Mira Chen
    Product design
    Admin
  • AL
    Ada Lovelace
    Engineering
    Member
  • GH
    Grace Hopper
    Platform
    Invited

API reference

The package exports list-item along with its composable parts. It forwards standard attributes to its root element; see the examples above for the component-specific props.

Accessibility

  • Content uses semantic HTML — lists are lists, tables are tables and metadata uses a definition list.
  • Interactive elements are real buttons or links with visible focus states.
  • Images require meaningful alt text; icons used decoratively are aria-hidden.

Vue and plain HTML

This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add list-item --framework vue or switch the framework in components.json.

<script setup lang="ts">
import { ListItem } from "@/components/ui/list-view";

const props = defineProps<{
  title: string;
  description?: string;
  class?: string;
}>();
</script>

<template>
  <ListItem :title="props.title" :description="props.description" :class="props.class">
    <template v-if="$slots.leading" #leading>
      <slot name="leading" />
    </template>
    <template v-if="$slots.trailing" #trailing>
      <slot name="trailing" />
    </template>
    <slot />
  </ListItem>
</template>

On this page