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
<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. |
|---|---|
| Type | Theme |
| Default | undefinedInherits default Tweakpane theme equivalent to ThemeUtils.presets.standard, or the theme set with setGlobalDefaultTheme().) |
| Description | Fires when the button is clicked. |
|---|---|
| Type | ButtonClickEvent |