Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Control Components

Button

A humble but effective push button.

Wraps the Tweakpane addButton method.

Usage outside of a <Pane> component will implicitly wrap the button in <Pane position="inline">.

See the <ButtonGrid> and <RadioGrid> components for a convenient way to lay out multiple buttons.


Count: 0
ButtonExample.svelte
<script lang="ts">
import { Button } from 'svelte-tweakpane-ui'
let count = 0
</script>
<Button on:click={() => count++} label="Count" title="Increment" />
<pre>Count: {count}</pre>

optional
Description

Text inside of the button.

Type string
Default 'Button'
optional
Description

Text displayed next to the button.

Type string
Default undefined
optional
Description

Prevent interactivity and gray out the control.

Type boolean
Default false
optional
Description

Custom color scheme.

Inherits default Tweakpane theme equivalent to ThemeUtils.presets.standard, or the theme set with setGlobalDefaultTheme().)

Type Theme
Default undefined

Description

Fires when the button is clicked.

Type ButtonClickEvent