Guide

Component props

Props accepted by the shipped Vue Flint renderer. They match the attrs the comark-flint-chart plugin writes on the AST node.

Props accepted by the shipped Vue renderer (match the attrs the plugin writes on the AST node):

PropTypeDefaultDescription
specunknown—Compiled backend-native chart spec
backendstring'vegalite'vegalite · echarts (others soft-fail with a visible error)
widthnumber | string400Chart canvas width (px)
heightnumber | string300Chart canvas height (px)
themestring | object—Theme name/object (already applied at compile time; passthrough)
inputunknown—Original Flint ChartAssemblyInput (passthrough)
classstring''Extra CSS classes on the wrapper

Register the Vue component

App.vue
<script setup lang="ts">
import { Markdown } from '@comark/vue'
import flint, { Flint } from 'comark-flint-chart/vue'
</script>

<template>
  <Markdown :plugins="[flint()]" :components="{ Flint }">
    {{ markdown }}
  </Markdown>
</template>

Handle render failures

Render failures soft-fail into a visible .flint-error alert — they do not throw into the page.

Copyright © 2026