Skip to Content
✨ Svelte Flow 1.0 is here! Rewritten for Svelte 5 with many new features and improvements.
ReferenceComponents<ControlButton />

<ControlButton />

Source on GitHub 

The <ControlButton /> component is used to render custom/ additional buttons for the <Controls /> component.

<script lang="ts"> import { Controls, ControlButton } from '@xyflow/svelte'; </script> <Controls> <ControlButton onclick={() => console.log('⚡️')}> ⚡️ </ControlButton> </Controls>

Props

The type for props of <ControlButton /> component is exported as ControlButtonProps. Additionally, it extends the props of <button />.

NameTypeDefault
bgColorstring
bgColorHoverstring
colorHoverstring
borderColorstring
...propsHTMLButtonAttributes
Last updated on