
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@spark-web/dropzone
Advanced tools
The Dropzone
component lets users upload files by clicking on, or dragging and
dropping onto the "drop zone". It can also be be triggered by clicking on the
label.
Each Dropzone
must be accompanied by a Field
with a label.
Effective form labeling helps inform users which selection to make.
By providing an accept
prop, we can make the Dropzone
only accept certain
file types.
The value must be an object with a common MIME type as keys and an array of file extensions as values (similar to showOpenFilePicker's types accept option).
<Stack gap="large">
<Field label="Upload image" description="Accepts common image file formats">
<Dropzone accept={{ 'image/*': ['.png', '.jpg'] }} />
</Field>
<Field label="Upload PDF" description="Only accepts PDF files">
<Dropzone accept={{ 'application/pdf': '.pdf' }} />
</Field>
</Stack>
By default, once a file as been added to the Dropzone, a document icon will
displayed next to the file name in the list below. If you have uploaded an
image, you can use the showImageThumbnails
to show an image preview instead.
<Field label="Upload image" description="Drop an image here to see a preview">
<Dropzone accept={{ 'image/*': ['.png', '.jpg'] }} showImageThumbnails />
</Field>
FAQs
--- title: Drop Zone isExperimentalPackage: true ---
The npm package @spark-web/dropzone receives a total of 571 weekly downloads. As such, @spark-web/dropzone popularity was classified as not popular.
We found that @spark-web/dropzone demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.