Text
A text field, in the spirit of the HTML <input type="text"> element.
Wraps Tweakpane's string binding.
Extends the vanilla JS Tweakpane API to update the bound value on every keystroke. (If you prefer
Tweakpane's default behavior of only updating on blur, set live={false}.)
See <TextArea> for a multi-line input variation.
Usage outside of a <Pane> component will implicitly wrap the text field in <Pane position="inline">.
Example
Section titled “Example”Message: Cosmic Manifold
<script lang="ts"> import { Text } from 'svelte-tweakpane-ui'
let text = 'Cosmic Manifold'</script>
<Text bind:value={text} label="The Message" /><pre>Message: {text}</pre>disabledSection titled “disabled” | |
| Description | Prevent interactivity and gray out the control. |
|---|---|
| Type | boolean |
| Default | false |
| optional | |
| Description | Custom color scheme. If undefined, inherits default Tweakpane theme equivalent to
|
|---|---|
| Type | Theme |
| Default | undefined |
| optional | |
| Description | Text displayed next to control. |
|---|---|
| Type | string |
| Default | undefined |
| bindablerequired | |
| Description | The value to control.
A |
|---|---|
| Type | string |
| optional | |
| Description | Whether to provide live updates to the bound To match expectations around reactive components, the default here diverges from the vanilla JS Tweakpane behavior, which only updates on blur. |
|---|---|
| Type | boolean |
| Default | true |
Events
Section titled “Events”changeSection titled “change” | |
| Description | Fires when This event is provided for advanced use cases. It's usually preferred to
bind to the The |
|---|---|
| Extends | ValueChangeEvent |
| Type | TextChangeEvent |