Image
An image input control.
Important: This component has some rough edges, and should be considered experimental.
Integrates the tweakpane-image-plugin, incorporating work by Florian Morel, Matheus Dias, Palash Bansal, and others.
Use the <File>
control instead if you're working with other file types, or don't wish to display a thumbnail preview of an uploaded image.
There is currently a known bug where change events' origin
values are sometimes incorrect. (This issue is limited to this component.)
Usage outside of a <Pane>
component will implicitly wrap the image control in <Pane position="inline">
.
Note that Svelte Tweakpane UI embeds a functionally identical fork of the plugin with build optimizations. The fork also changes the package name to @kitschpatrol/tweakpane-plugin-image
for consistency with other plugins.
Tap “No Image” above to load an image from disk.
bindablerequired | |
Description | Image data as Base64-encoded string, or |
---|---|
Type | ImageValue |
optional | |
Description | Array of image extension types to accept. |
---|---|
Type | string[] |
Default | ['.jpg', '.png', '.gif'] |
optional | |
Description | How to display the image in the preview pane. Renamed from |
---|---|
Type | 'contain' | 'cover' |
Default | 'cover' |
optional | |
Description | Prevent interactivity and gray out the control. |
---|---|
Type | boolean |
Default | false |
optional | |
Description | Text displayed next to control. |
---|---|
Type | string |
Default | undefined |
optional | |
Description | Tweakpane's internal options object. See Valid types are contingent on the type of the value This is intended internal use, when implementing convenience components wrapping Binding's functionality. Options of interest are instead exposed as top-level props in Svelte Tweakpane UI. |
---|---|
Type | BaseInputParams |
Default | undefined |
optional | |
Description | Custom color scheme. |
---|---|
Type | Theme |
Default | undefined Inherits default Tweakpane theme equivalent to ThemeUtils.presets.standard , or the theme set with setGlobalDefaultTheme() . |
Description | Fires when This event is provided for advanced use cases. It's usually preferred to bind to the The |
---|---|
Extends | ValueChangeEvent |
Type | ImageChangeEvent |