Skip to content
On this page

Background

Vue Flow comes with two background pattern variants: dots and lines.

Usage

To use the background simply pass the Background component as a child to the VueFlow component.

<template>
  <VueFlow>
    <Background :variant="BackgroundVariant.Dots" pattern-color="#f8f8f8" />
  </VueFlow>
</template>

Props

NameDefinitionTypeOptionalDefault
variantPattern variantBackgroundVarianttruedots
gapPattern gapnumbertrue10
sizePattern sizenumbertrue0.4
patternColorPattern colorstringtrue#81818a
bgColorIs node draggingbooleantrue#fff
heightBackground heightnumbertrue100
widthBackground widthnumbertrue100
xX-offsetnumbertrue0
yY-offsetnumbertrue0

Released under the MIT License.