File
A file input control.
Important: This component has some rough edges, and should be considered experimental.
Integrates the File Input control from LuchoTurtle's tweakpane-plugin-file-import plugin. Some of the control's parameter names have been changed for consistency with the <Image>
CompositionEvent.
Use the <Image>
control instead if you're working with images and want to see a thumbnail preview of the 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.
Loading...
bindablerequired | |
Description | File data, or |
---|---|
Type | FileValue |
optional | |
Description | Array of valid file extensions. |
---|---|
Type | string[] |
Default | Any file extension |
optional | |
Description | String shown when the user tries to upload an invalid filetype. |
---|---|
Type | string |
Default | 'Unaccepted file type.' |
optional | |
Description | Height of the file input drop zone, in rows. |
---|---|
Type | number |
Default | 3 |
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 | FileChangeEvent |