Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 1.21 KB

README.md

File metadata and controls

43 lines (32 loc) · 1.21 KB

solid-uppy

SolidJS bindings for Uppy

NPM JavaScript Style GuideOpen in CodeSandbox

Install

yarn add @uppy/core solid-uppy

Usage

import Uppy from '@uppy/core';
import { createUppy, useUppyPlugin, useUppyEvent } from 'solid-uppy';
import Dashboard from '@uppy/dashboard';
import ImageEditor from '@uppy/image-editor';

function Example(props) {
  // Create an instance
  const instance = createUppy(() => new Uppy());

  // Use some plugins
  useUppyPlugin(instance, 'Dashboard', Dashboard, {
    inline: true,
    get target() {
      return props.element;
    },
  });
  useUppyPlugin(instance, 'ImageEditor', ImageEditor);

  // Listen to events
  useUppyEvent(instance, 'file-editor:start', (file) => {
    console.log(file);
  }); 
}

License

MIT © lxsmnsyc