@adyen/lume-vue3

中文文档
1.16.1发布于 2026/10/21MITTypeScriptES Module构建来源已验证近 30 天下载 2428

Lume is a Vue data visualization component library, built with Typescript and D3.

原始使用文档
文档目录16 节
  1. About
  2. What's different about Lume
  3. Stack
  4. Getting started
  5. Installation
  6. Components
  7. Plugin
  8. Styles
  9. Development
  10. Docker
  11. About Vue versions
  12. Releasing
  13. Roadmap
  14. Contacts
  15. Maintainers
  16. Contributors

Lume

PR workflow MIT License Netlify Status

Lume is a combination of a set of design guidelines for creating data visualizations that tell stories, and a component library that implements them, built for Vue applications.

Note: Lume ships two packages - one that is compatible with Vue 2.7, and another, with Vue 3. The second is published as @adyen/lume-vue3. Our examples import the Vue 2.7-compatible version, but if you're using Vue 3, just update the import name.

Design guidelines (Website)

About

What's different about Lume

🧑‍🎨 Backed by strong data visualization design principles, guidelines and patterns
🖼️ Leverages Vue for SVG rendering and reactivity
📦 Available for both Vue 2.7 and 3

Stack

Dependencies

Dev stack

Getting started

Installation

To install Lume, run the following command:

Vue 2.7+

$ npm install @adyen/lume

Vue 3

$ npm install @adyen/lume-vue3

Components

You can import Lume components to your Vue app:

// SFC <script type="ts">

import { defineComponent } from 'vue';
import { LumeBarChart } from '@adyen/lume';

export default defineComponent({
  components: { LumeBarChart },
  ...
});
// Composition <script setup type="ts">

import { LumeBarChart } from '@adyen/lume';

Plugin

You can also import Lume as a Vue plugin that you install in your global Vue setup:

import Vue from 'vue';
import LumePlugin from '@adyen/lume/plugin';

import App from './my-app.vue';

Vue.use(LumePlugin);

const app = new Vue(App).$mount('#root');

Styles

For Lume to render as intended, you also need to import its styles.

CSS (global)

// app/index/main.ts
import Vue from 'vue';
import App from './my-app.vue';

// Main styles
import '@adyen/lume/styles';
// (Optional) Lume font
import '@adyen/lume/font';

const app = new Vue(App).$mount('#root');

Sass (global)

// app/index/main.ts
import Vue from 'vue';
import App from './my-app.vue';

// Main styles
import '@adyen/lume/scss';
// (Optional) Lume font
import '@adyen/lume/font';

const app = new Vue(App).$mount('#root');

CSS (SFC)

<template>...</template>

<script>
...
</script>

<!-- Main styles -->
<style src="@adyen/lume/styles"></style>
<!-- (Optional) Lume font -->
<style src="@adyen/lume/font"></style>

Sass (SFC)

<template>...</template>

<script>
...
</script>

<!-- Main styles -->
<style lang="scss" src="@adyen/lume/scss"></style>
<!-- (Optional) Lume font -->
<style src="@adyen/lume/font"></style>

Sass (with overrides)

<template>...</template>

<script>
...
</script>

<!-- Main styles -->
<style lang="scss">
@use '@adyen/lume/scss' with (
  $lume-font-family: 'Times New Roman'
);
</style>

Development

You can clone this repo and use pnpm to install dependencies. We use Storybook to develop our features.

Docker

To run the app inside a Docker container:

  1. Create a .env file with your Docker image URL:
      $ echo DOCKER_IMAGE={YOUR_IMAGE_HERE} >> .env
    
  2. Start your container:
      $ docker compose up -d
    
  3. Attach to it in your terminal:
      $ docker attach lume
    
  4. Install pnpm:
      $ npm i -g pnpm@11
    
  5. (Optional, depends on your Docker image) Add the npm global directory to the PATH variable:
      $ export PATH="${PATH}:/root/local/bin"
    

About Vue versions

Lume ships two packages, one for each Vue version (2 and 3).

Development is done in Vue 3, keeping in mind that the same source code must work the same way on both Vue versions, so some of the new Vue 3 APIs are restricted, unless provided with a fallback.

Storybook

Storybook is available by running the following command:

$ pnpm run storybook

Every chart component should have its own .stories file, and it will be automatically loaded onto the Storybook manager.

Available addons

Releasing

To generate a release:

  1. Create a release branch and push it as upstream:
      $ git checkout -b release-[VERSION] && git push -u origin release-[VERSION]
    
  2. Run the release command:
      $ npm run release
    
  3. Create a PR for the release branch.
  4. After it's merged, publish the GitHub release. This will then publish the new release in NPM.

This will prompt you with an interactive CLI to create a new version, tag, changelog entry and release.

Roadmap

FeatureStatus
Charts
Alluvial (sankey) diagram✅
Single bar chart✅
Grouped bar chart✅
Stacked bar chart✅
Horizontal orientation for all bar charts✅
Line chart✅
Sparkline chart✅
Features
A11y colors🚧
A11y guidelines & impl.❌
Dark theme❌
Select dataset in legend❌

✅ - Done
🚧 - WIP
❌ - To do

Contacts

Maintainers

Contributors

版本与发布记录

@adyen/lume-vue3 共发布 48 个版本,首次发布于 2023/06/23;过去 12 个月发布了 8 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.16.1latest2026/10/2117 天前
1.16.02026/09/241 个月前
1.15.02026/08/063 个月前
1.14.02026/08/043 个月前
1.13.02026/08/043 个月前
1.12.42026/07/203 个月前

关于 @adyen/lume-vue3 的常见问题

@adyen/lume-vue3 是什么?

Lume is a Vue data visualization component library, built with Typescript and D3.

如何安装 @adyen/lume-vue3?

在项目目录运行 npm install @adyen/lume-vue3,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:vue(>=3.x)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@adyen/lume-vue3 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@adyen/lume-vue3 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@adyen/lume-vue3 可以商用吗?

@adyen/lume-vue3 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@adyen/lume-vue3 的下载量有多少?

根据 npm 官方下载统计,@adyen/lume-vue3 在 2026/10/05 – 2026/11/03 这 30 天内被下载 2,428 次,日均约 81 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adyen/lume-vue3 还在维护吗?

最新版本 1.16.1 发布于 2026/10/21(17 天前);至今共发布 48 个版本,其中过去 12 个月发布了 8 个;首次发布于 2023/06/23。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。