# 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 63 KB gzipped for the underlying grid core — 52 KB with a [lite feature set](https://coreui.io/data-grid/vue/docs/customization/feature-sets/).
## 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 builds on the `.table`, `.btn` and form styles from `@coreui/coreui` or
`@coreui/coreui-pro` (≥ 5) when one of them is on the page, and ships its own copy
of them when it is not — see [Stylesheet](#stylesheet) below. The grid stylesheet
ships in the `@coreui/data-grid` package (installed automatically as a
dependency).
```vue
```
## Stylesheet
Two builds ship in the package — load exactly one:
| File | Load it when |
| --- | --- |
| `data-grid.css` | `@coreui/coreui` or `@coreui/coreui-pro` (≥ 5) is already on the page. |
| `data-grid.standalone.css` | It is not. Adds ~2.7 kB gzip. |
`data-grid.standalone.css` carries the slice of CoreUI the grid's markup relies
on — `.table`, `.btn`, the form controls, `.pagination`, `.spinner-border` and
`.visually-hidden`. Those rules are scoped to `.data-grid` and emitted into a
`data-grid-base` cascade layer, so they never restyle the rest of your page, and
an unlayered CoreUI stylesheet always overrides them.
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/) |
| Infinite scroll | `infinite-scroll` | [Infinite scroll](https://coreui.io/data-grid/vue/docs/features/infinite-scroll/) |
| Auto row height | `auto-row-height` | [Auto row height](https://coreui.io/data-grid/vue/docs/features/virtualization/#auto-row-height) |
| Row reordering | `row-order` | [Row reordering](https://coreui.io/data-grid/vue/docs/features/row-reordering/) |
## 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/) |
## Interaction
| Feature | Prop | Docs |
| --- | --- | --- |
| Keyboard navigation (ARIA grid) | `cell-navigation` | [Keyboard navigation](https://coreui.io/data-grid/vue/docs/features/keyboard-navigation/) |
| Cell selection & clipboard copy | `cell-selection` | [Cell selection](https://coreui.io/data-grid/vue/docs/features/cell-selection/) |
| Inline editing | `editing` | [Inline editing](https://coreui.io/data-grid/vue/docs/features/editing/) |
| Undo & redo | `history` | [Undo & redo](https://coreui.io/data-grid/vue/docs/features/history/) |
| Built-in toolbar | `toolbar` | [Toolbar](https://coreui.io/data-grid/vue/docs/features/toolbar/) |
## 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/) |
| Excel export (.xlsx) | `toolbar.export.exporter` | [Excel export](https://coreui.io/data-grid/vue/docs/features/excel-export/) |
| Print | `toolbar.print` | [Print](https://coreui.io/data-grid/vue/docs/features/print/) |
| Save & restore state | `state-key` | [Save & restore state](https://coreui.io/data-grid/vue/docs/features/state/) |
| Feature sets (smaller bundle) | `features` | [Feature sets](https://coreui.io/data-grid/vue/docs/customization/feature-sets/) |
| 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/) |
---
# Vue Data Grid Browsers and Devices
> The browsers and devices CoreUI Data Grid for Vue supports, the floor it targets, and the browserslist configuration behind it.
## Supported browsers
The Data Grid targets the **latest stable releases** of every major browser, with
a floor of **Chrome 123, Edge 123, Firefox 129, Safari 17.5 and iOS 17.5**.
Measured with `npx browserslist --coverage`, that range covers **86.47%** of
global usage.
Browsers built on the same engines (Chromium, Gecko, WebKit) are not listed
separately but behave the same, as long as their engine is at or above those
versions. Proxy browsers that render server-side — Opera Mini, UC Browser Mini,
QQ Browser, KaiOS — are excluded outright and are not supported.
### What sets the floor
The floor is the CoreUI PRO baseline, shared with the component library the grid
sits next to, not a limit the grid's own code imposes. Its own requirements are
lower:
| What the grid uses | Available from |
| --- | --- |
| `inset-inline-start` / `inset-inline-end` (sticky offsets for pinned columns) | Chrome 87, Firefox 63, Safari 14.1 |
| `:is()` | Chrome 88, Firefox 78, Safari 14 |
| Private class fields, `??`, `?.`, `??=` in the shipped bundle | Chrome 85, Firefox 90, Safari 14.1 |
The grid would therefore run on engines older than the floor, but only the range
above is tested — and sharing the baseline means a page that mixes the grid with
CoreUI PRO components has a single set of supported engines, not two.
## The browserslist configuration
One file drives both the CSS prefixes Autoprefixer emits and the syntax level
[rolldown](https://rolldown.rs/) lowers the grid core to — including the
`@tanstack/table-core` and `@tanstack/virtual-core` it bundles:
```text
last 2 major versions
not dead
unreleased versions
Chrome >= 123
Edge >= 123
Firefox >= 129
iOS >= 17.5
Safari >= 17.5
not and_uc > 0
not and_qq > 0
not kaios > 0
not op_mini all
```
Raising the floor is what keeps the bundle small: at the previous Chrome 60 /
Safari 12 floor the same code needed 57,477 B gzip against 54,742 B (measured
at the rolldown migration) — a 2.7 kB saving from the floor alone — and
Autoprefixer dropped every prefix but `-webkit-user-select`.
### Mobile devices
| | Chrome | Firefox | Safari | Android Browser & WebView |
| --- | --- | --- | --- | --- |
| **Android** | Supported | Supported | — | Supported |
| **iOS** | Supported | Supported | Supported | — |
### Desktop browsers
| | Chrome | Firefox | Microsoft Edge | Opera | Safari |
| --- | --- | --- | --- | --- | --- |
| **Mac** | Supported | Supported | Supported | Supported | Supported |
| **Windows** | Supported | Supported | Supported | Supported | — |
| **Linux** | Supported | Supported | — | Supported | — |
## Vue
`@coreui/vue-data-grid` needs **Vue 3.4 or newer** on top of the browser range
above. See [installation](https://coreui.io/data-grid/vue/docs/getting-started/installation/).
---
# 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