@vuecs/list

Compound list components for vuecs (List / Header / Body / Item / ItemText / ItemActions / Footer / Loading / Empty) plus the defineList() factory + useList() injector. Successor to @vuecs/list-controls — clean break, compound API.
6,828 4
Install
npm install @vuecs/list
Latest Version:1.3.0
Vue:3
License:Apache-2.0
Last Updated:Oct 16, 2026
Links: GitHub  ·  npm
Maintainer: tada5hi

@vuecs/list

npm version CI license

The compound list of vuecs — a stateful <VCList> root plus part components that read from it, with built-in selection, busy/empty states, and an externalizable state container.

✨ What's inside

  • 🧩 Five-part compound — <VCList> (state + selection coordinator), <VCListBody>, <VCListItem>, <VCListEmpty>, <VCListLoading>. Header / footer / per-row chrome stay your markup, styled via slot-prop class strings.
  • ☑️ Built-in selection — v-model:selection, single or multi, full ARIA-listbox semantics with keyboard range selection.
  • 🏪 defineList() factory — Pinia-style external state container; share one list state between the component, a toolbar, and a URL sync without prop-drilling.
  • 🪝 useList() / useListItem() — strict injectors for building custom parts that participate in the compound.
  • 🔤 Type-safe item slots — <VCList> / <VCListItem> are generic over the row type, so <VCListItem :data="user">'s #default="{ data }" infers data as your entity type with no cast.
  • 🎨 Density variants — compact / normal / spacious, plus disabled / active / selected item states across all shipping themes.

📦 Installation

npm install @vuecs/list

⚡ Usage

<VCList :data="users" :busy="loading" v-model:selection="selected" selection-mode="multi">
    <template #default="{ classes }">
        <header :class="classes.header">Users</header>
        <VCListBody>
            <VCListItem v-for="user in users" :key="user.id" :data="user" selectable>
                <template #default="{ data, classes }">
                    <!-- `data` infers your row type from `:data` -->
                    <span :class="classes.text">{{ data.name }}</span>
                    <span :class="classes.actions">
                        <VCButton size="sm" variant="ghost">Edit</VCButton>
                    </span>
                </template>
            </VCListItem>
        </VCListBody>
        <VCListEmpty>No users yet.</VCListEmpty>
        <VCListLoading overlay>Refreshing…</VCListLoading>
    </template>
</VCList>

📚 Documentation

Full reference, selection semantics, and defineList() recipes: vuecs.dev/components/list

License

Made with 💚

Published under Apache 2.0 License.

Related Packages

wkjp-list-page

Vue2 + ElementUI CommonListPage component

9,010
@vuecs/button

A general-purpose button component for Vue 3.

6,887 4
@vuecs/icon

Iconify-backed icon component for vuecs. Wraps @iconify/vue's with a vuecs-names...

5,115 4
vue3-low-req

前端js 组件库,快捷开发、组件封装

3,879

Version History

Version Released Vue License
1.3.0 ^3.x Apache-2.0
1.2.1 ^3.x Apache-2.0
1.2.0 ^3.x Apache-2.0
1.1.1 ^3.x Apache-2.0
1.1.0 ^3.x Apache-2.0