Installation
VueList is a Vue 3 plugin that requires minimal setup. Follow this guide to install and configure it in your project.Requirements
- Vue 3.5 or higher
- Vue Router 4.5 or higher (for URL synchronization)
Install Package
Install VueList using your preferred package manager:Basic Setup
Register VueList as a plugin in your Vue application:main.js
Configuration
VueList requires arequestHandler function that defines how to fetch data from your API. This is configured once during plugin installation.
Request Handler Function
TherequestHandler receives a context object with all the list state and should return a Promise that resolves to an object with items and count:
Type Signature
Complete Example with State Management
Here’s a complete setup with state persistence and proper error handling:plugins/vue-list.js
main.js
Configuration Options
Component Prefix
By default, components are registered without a prefix (VueList, VueListItems, etc.). You can add a custom prefix:
State Manager (Optional)
The state manager is optional but highly recommended for better UX. It persists user preferences like:- Current page number
- Items per page
- Search query
- Active filters
- Sort settings
- Column visibility
Different API Patterns
REST API with Separate Count Endpoint
GraphQL API
Headers-Based Count
Next Steps
Now that VueList is installed, build your first list:Quick Start
Build your first list in 5 minutes