Skip to content

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

Control Components

Checkbox

A checkbox.

Wraps Tweakpane's boolean input binding.

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


Enabled: false
CheckboxExample.svelte
<script lang="ts">
import { Checkbox } from 'svelte-tweakpane-ui'
let reticulationEnabled: boolean = false
</script>
<Checkbox bind:value={reticulationEnabled} label="Reticulation" />
<pre>Enabled: {reticulationEnabled}</pre>

optional
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 ThemeUtils.presets.standard, or the theme set with setGlobalDefaultTheme().

Type Theme
Default undefined
optional
Description

Text displayed next to control.

Type string
Default undefined
bindablerequired
Description

The value to control.

Type boolean

Description

Fires when value changes.

This event is provided for advanced use cases. It's usually preferred to bind to the value prop instead.

The event.details payload includes a copy of the value and an origin field to distinguish between user-interactive changes (internal) and changes resulting from programmatic manipulation of the value (external).

Extends ValueChangeEvent
Type CheckboxChangeEvent