Components
List Item
A re-export of the List View item primitive.
Installation
$ npx veil-ui@latest add list-itemUsage
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 requestAssigned to you
- Update changelogDue tomorrow
Members
- MCMira ChenProduct designAdmin
- ALAda LovelaceEngineeringMember
- GHGrace HopperPlatformInvited
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
alttext; icons used decoratively arearia-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>