# CoreUI Data Grid Vue.js documentation
> High-performance Vue data grid for CoreUI — 100,000 rows with sorting, filtering, selection and pagination.
---
# CoreUI Vue Data Grid
> High-performance Vue data grid — 100,000 rows with sorting, filtering, selection, pagination, server-side data, column resizing, pinning, ordering and full theming.
CoreUI Data Grid is a high-performance grid for displaying and interacting with
large tabular datasets. It renders 100,000 rows in the browser with sorting,
filtering, selection and pagination, and hands off to your API when the data
outgrows the browser's memory.
## Why Data Grid
- **Fast by default.** Row [virtualization](https://coreui.io/data-grid/vue/docs/features/virtualization/) keeps only
the visible window in the DOM, so scrolling stays smooth at 100k rows.
- **Headless core, styled shell.** A proven headless table engine and row
virtualization under a CoreUI-themed UI. Drop to the
[headless table](https://coreui.io/data-grid/vue/docs/api/headless/) any time.
- **Complete feature set.** Sorting, [filtering](https://coreui.io/data-grid/vue/docs/features/filtering/),
[selection](https://coreui.io/data-grid/vue/docs/features/row-selection/), [pagination](https://coreui.io/data-grid/vue/docs/features/pagination/),
[server-side data](https://coreui.io/data-grid/vue/docs/features/server-side-data/), column
[sizing](https://coreui.io/data-grid/vue/docs/columns/sizing/), [pinning](https://coreui.io/data-grid/vue/docs/columns/pinning/),
[ordering & visibility](https://coreui.io/data-grid/vue/docs/columns/ordering-visibility/), a
[column menu](https://coreui.io/data-grid/vue/docs/columns/menu/) and [CSV export](https://coreui.io/data-grid/vue/docs/features/csv-export/).
- **Themeable.** Every knob is a `--cui-data-grid-*` CSS variable resolving
through CoreUI semantic tokens, so light/dark theming works with no extra CSS.
See [Styling & theming](https://coreui.io/data-grid/vue/docs/customization/styling/).
- **Vue-native.** Reactive props, emits and scoped slots — no wrappers around a
DOM widget.
- **Small.** Around 48 KB gzipped for the underlying grid core.
## How it's built
The grid is a thin, styled layer over a headless table engine (state, sorting,
filtering, pagination, pinning, ordering, visibility) and row virtualization
(windowed rendering). Props are named after the features they control, emits
are verbs, and event payloads carry the grid's own state — a small, predictable
API.
```vue
```
## Get started
1. [Install](https://coreui.io/data-grid/vue/docs/getting-started/installation/) the package.
2. Follow the [Quickstart](https://coreui.io/data-grid/vue/docs/getting-started/quickstart/) to render your first
grid.
3. Browse the [feature matrix](https://coreui.io/data-grid/vue/docs/getting-started/features/) to see what's
available.
## Packages
| Package | Framework | Docs |
| ------- | --------- | ---- |
| `@coreui/data-grid` | Vanilla JavaScript | [coreui.io/data-grid/docs](https://coreui.io/data-grid/docs/) |
| `@coreui/react-data-grid` | React | [coreui.io/data-grid/react/docs](https://coreui.io/data-grid/react/docs/) |
| `@coreui/vue-data-grid` | Vue | [coreui.io/data-grid/vue/docs](https://coreui.io/data-grid/vue/docs/) |
| `@coreui/angular-data-grid` | Angular | [coreui.io/data-grid/angular/docs](https://coreui.io/data-grid/angular/docs/) |
---
# Vue Data Grid Installation
> Install CoreUI Data Grid for Vue via npm and load its stylesheet.
## npm
```sh
npm install @coreui/vue-data-grid
```
Data Grid layers on the `.table` styles from `@coreui/coreui` or
`@coreui/coreui-pro` (≥ 5), so make sure one of them is loaded on the page. The
grid stylesheet ships in the `@coreui/data-grid` package (installed
automatically as a dependency).
```vue
```
## Stylesheet
The grid's CSS defines `--cui-data-grid-*` custom properties that resolve through
CoreUI's semantic variables, so it inherits your theme (including
`data-coreui-theme="dark"`) automatically. See
[Styling & theming](https://coreui.io/data-grid/vue/docs/customization/styling/) for the full token reference.
Next: the [Quickstart](https://coreui.io/data-grid/vue/docs/getting-started/quickstart/).
---
# Vue Data Grid Quickstart
> Render your first CoreUI Data Grid for Vue in a few lines — columns, data, a stable row key, then your first feature.
This guide builds a working grid from scratch. It assumes you've
[installed](https://coreui.io/data-grid/vue/docs/getting-started/installation/) `@coreui/vue-data-grid` and loaded
the grid stylesheet.
## 1. The component
Import `CDataGrid` and the stylesheet in your component:
```vue
```
## 2. Columns and data
Define columns by `key` (the property to read from each item) and pass your
`items`:
```vue
```
`itemKey` returns a stable id per row. It's optional, but
[selection](https://coreui.io/data-grid/vue/docs/features/row-selection/) needs it to survive sorting and filtering —
set it up front.
## 3. Turn on a feature
Every feature is a single prop. Add filtering and selection:
```vue
```
Sorting is on by default. From here, explore the
[feature matrix](https://coreui.io/data-grid/vue/docs/getting-started/features/) or jump to any feature page.
## 4. React to changes
The grid emits [events](https://coreui.io/data-grid/vue/docs/api/events/) with structured state:
```vue
console.log(selectedItems)"
/>
```
## What's next
- Handle large or remote data with [server-side data](https://coreui.io/data-grid/vue/docs/features/server-side-data/).
- Customize cells with a column [`formatter` or a `cell-{key}` slot](https://coreui.io/data-grid/vue/docs/columns/overview/).
- Replace built-in chrome with [slots](https://coreui.io/data-grid/vue/docs/features/slots/) or drive the
[headless table](https://coreui.io/data-grid/vue/docs/api/headless/) directly.
---
# Vue Data Grid Features
> A capability matrix of everything CoreUI Data Grid for Vue does today, with the prop that turns each feature on and a link to its docs.
Everything the Data Grid does today, the prop (or slot / helper) that enables
it, and where to read more. Features not listed here are on the
[roadmap](https://coreui.io/data-grid/vue/docs/resources/roadmap/).
## Data & rendering
| Feature | Prop | Docs |
| --- | --- | --- |
| Row virtualization | `virtualization` (on by default) | [Virtualization](https://coreui.io/data-grid/vue/docs/features/virtualization/) |
| Pagination | `pagination` | [Pagination](https://coreui.io/data-grid/vue/docs/features/pagination/) |
| Server-side data | `dataProvider` | [Server-side data](https://coreui.io/data-grid/vue/docs/features/server-side-data/) |
| Row selection | `rowSelection` | [Row selection](https://coreui.io/data-grid/vue/docs/features/row-selection/) |
## Sorting & filtering
| Feature | Prop | Docs |
| --- | --- | --- |
| Column sorting (multi-column) | `sorting` (on by default) | [Sorting](https://coreui.io/data-grid/vue/docs/features/sorting/) |
| Per-column filter row | `columnFilters` | [Filtering](https://coreui.io/data-grid/vue/docs/features/filtering/) |
| Global search | `globalFilter` | [Filtering](https://coreui.io/data-grid/vue/docs/features/filtering/) |
| Custom filter UI / predicate | `filter-{key}` slot, `filterFn` (per column) | [Filtering](https://coreui.io/data-grid/vue/docs/features/filtering/) |
## Columns
| Feature | Prop | Docs |
| --- | --- | --- |
| Custom cell formatting / rendering | `formatter` (per column), `cell-{key}` slot | [Columns overview](https://coreui.io/data-grid/vue/docs/columns/overview/) |
| Column resizing | `columnSizing` | [Column sizing](https://coreui.io/data-grid/vue/docs/columns/sizing/) |
| Column pinning | `columnPinning` | [Column pinning](https://coreui.io/data-grid/vue/docs/columns/pinning/) |
| Column ordering (drag & drop) | `columnOrder` | [Ordering & visibility](https://coreui.io/data-grid/vue/docs/columns/ordering-visibility/) |
| Column visibility | `columnVisibility` | [Ordering & visibility](https://coreui.io/data-grid/vue/docs/columns/ordering-visibility/) |
| Column header menu | `columnMenu` | [Column menu](https://coreui.io/data-grid/vue/docs/columns/menu/) |
## Customization & output
| Feature | Prop / API | Docs |
| --- | --- | --- |
| Custom toolbar / pagination / empty state | `toolbar`, `pagination`, `empty` slots | [Slots](https://coreui.io/data-grid/vue/docs/features/slots/) |
| CSV export | `exportCsv()`, `downloadCsv()` | [CSV export](https://coreui.io/data-grid/vue/docs/features/csv-export/) |
| Theming (CSS variables) | `--cui-data-grid-*` | [Styling & theming](https://coreui.io/data-grid/vue/docs/customization/styling/) |
| Localization (i18n) | `labels` | [Localization](https://coreui.io/data-grid/vue/docs/customization/localization/) |
| Headless escape hatch | exposed `table` | [Headless table](https://coreui.io/data-grid/vue/docs/api/headless/) |
---
# LLMs.txt
> LLM-optimized documentation endpoints for CoreUI Vue Data Grid — llms.txt, llms-full.txt, and a Markdown version of every page.
## Introduction
[llms.txt](https://llmstxt.org) is an emerging standard that helps AI models understand and navigate documentation. The CoreUI Vue Data Grid docs expose three LLM-friendly endpoints so assistants can retrieve accurate, up-to-date content straight from the source.
For a richer, tool-based integration, see [MCP Server](https://coreui.io/data-grid/vue/docs/ai-tools/mcp/).
## /llms.txt
A structured index of the documentation — every page as a titled, described link, grouped by section. It gives an LLM a compact map of what exists and where.
[Open llms.txt](https://coreui.io/data-grid/vue/docs/llms.txt)
## /llms-full.txt
The entire documentation concatenated into a single Markdown file, so a model can ingest the whole set in one request.
[Open llms-full.txt](https://coreui.io/data-grid/vue/docs/llms-full.txt)
## Markdown version of any page
Append `.md` to any documentation page URL to get its clean Markdown version, without the site chrome.
For example: [/data-grid/vue/docs/features/sorting.md](https://coreui.io/data-grid/vue/docs/features/sorting.md)
---
# MCP Server
> Bring the CoreUI Vue Data Grid documentation into your AI coding assistant with the @coreui/docs-mcp Model Context Protocol server.
## Introduction
[Model Context Protocol (MCP)](https://modelcontextprotocol.io) is an open standard that lets AI assistants connect to external tools and data sources. The **`@coreui/docs-mcp`** server gives your assistant direct access to the official CoreUI documentation, so it answers from the current docs instead of relying on stale training data.
Point it at the CoreUI Vue Data Grid docs with the `--base-path` option shown below.
It provides:
- **Documentation pages** — getting started, features, columns, and API reference.
- **Live content** — read on demand from `coreui.io`, always matching the latest release.
- **Structured API** — options, events, and methods for the grid.
The server runs locally over stdio via `npx` — no global install required.
## Installation
### Claude Code
Add the server with the CLI, then start a new session and run `/mcp` to verify the connection:
```bash
claude mcp add coreui-data-grid -s user -- npx -y @coreui/docs-mcp --framework vue --base-path /data-grid/vue/docs
```
### Cursor
Create `.cursor/mcp.json` in your project (or `~/.cursor/mcp.json` for global configuration):
```json
{
"mcpServers": {
"coreui-data-grid": {
"command": "npx",
"args": ["-y", "@coreui/docs-mcp", "--framework", "vue", "--base-path", "/data-grid/vue/docs"]
}
}
}
```
### VS Code
Create `.vscode/mcp.json` in your project. Note that VS Code uses the `servers` key:
```json
{
"servers": {
"coreui-data-grid": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@coreui/docs-mcp", "--framework", "vue", "--base-path", "/data-grid/vue/docs"]
}
}
}
```
### Windsurf
Edit `~/.codeium/windsurf/mcp_config.json`:
```json
{
"mcpServers": {
"coreui-data-grid": {
"command": "npx",
"args": ["-y", "@coreui/docs-mcp", "--framework", "vue", "--base-path", "/data-grid/vue/docs"]
}
}
}
```
### Claude Desktop
Edit `claude_desktop_config.json` (Settings → Developer → Edit Config):
```json
{
"mcpServers": {
"coreui-data-grid": {
"command": "npx",
"args": ["-y", "@coreui/docs-mcp", "--framework", "vue", "--base-path", "/data-grid/vue/docs"]
}
}
}
```
### OpenAI Codex
Add it with the CLI, or edit `~/.codex/config.toml` directly:
```bash
codex mcp add coreui-data-grid -- npx -y @coreui/docs-mcp --framework vue --base-path /data-grid/vue/docs
```
```toml
[mcp_servers.coreui-data-grid]
command = "npx"
args = ["-y", "@coreui/docs-mcp", "--framework", "vue", "--base-path", "/data-grid/vue/docs"]
```
## Tools
Once connected, your assistant can call the following tools:
| Tool | Description |
| --- | --- |
| `list_components` | List documentation pages, optionally filtered by section or a substring. |
| `search_docs` | Search the documentation and return the best matching pages. |
| `get_doc_page` | Fetch the full Markdown of a page by slug or URL. |
| `get_component_api` | Get the structured API (options, events, methods) for the grid. |
## Configuration
| Flag | Environment variable | Default | Description |
| --- | --- | --- | --- |
| `--framework ` | `COREUI_DOCS_FRAMEWORKS` | `bootstrap,react,vue` | Enabled editions (comma-separated). The first is the default for tools. |
| `--base-url ` | `COREUI_DOCS_BASE_URL` | `https://coreui.io` | Origin of the CoreUI site. Override only for a staging or self-hosted mirror. |
| `--base-path ` | `COREUI_DOCS_BASE_PATH` | `/{framework}/docs` | Path after the origin where the docs live; `{framework}` is substituted. |
| `--docs-path