# Getting Started
# Installation
# Direct Download / CDN
- unpkg: https://unpkg.com/vue-pivottable@latest/dist/vue-pivottable.umd.min.js (opens new window)
- jsdelivr: https://cdn.jsdelivr.net/npm/vue-pivottable@latest/dist/vue-pivottable.umd.min.js (opens new window)
Include vue-pivottable after Vue:
<script src="/path/to/vue.js"></script>
<script src="/path/to/vue-pivottable.umd.min.js"></script>
# NPM
# install in your project
npm install vue-pivottable
# Usage
Import and use a component.
# Vue Pivottable
<template>
<vue-pivottable
:data="[{color: 'blue', shape: 'circle'},{color: 'red', shape: 'triangle'}]"
:rows="['color']"
:cols="['shape']"
>
</vue-pivottable>
</template>
<script>
import { VuePivottable } from 'vue-pivottable'
import 'vue-pivottable/dist/vue-pivottable.css'
export default {
components: {
VuePivottable
}
}
</script>
# Vue Pivottable UI
<template>
<vue-pivottable-ui
:data="[{color: 'blue', shape: 'circle'},{color: 'red', shape: 'triangle'}]"
:rows="['color']"
:cols="['shape']"
>
</vue-pivottable-ui>
</template>
<script>
import { VuePivottableUi } from 'vue-pivottable'
import 'vue-pivottable/dist/vue-pivottable.css'
export default {
components: {
VuePivottableUi
}
}
</script>
← Introduction Locale →