
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-file-input
Advanced tools
Styling native HTML file inputs can be a pretty big pain, and to make matters worse, the browser default look-and-feel is probably at odds with your app's design. This problem is what react-file-input aims to solve.
Once integrated, react-file-input quickly eliminates the headaches associated with forms requiring file upload.
npm install react-file-input
Usage is pretty simple: just use react-file-input instead of <input type="file" />
!
app.jsx
var React = require('react'),
FileInput = require('react-file-input');
var Form = React.createClass({
handleChange: function(event) {
console.log('Selected file:', event.target.files[0]);
},
render: function() {
return (
<form>
<FileInput name="myImage"
accept=".png,.gif"
placeholder="My Image"
className="inputClass"
onChange={this.handleChange} />
</form>
);
},
});
The list of valid props can be found below.
Behave just like standard react-style attributes on input controls.
Captivation Software (@teamcaptivation)
By all means, if you see room for improvement, let us know!
MIT License
FAQs
Simple file input component for React
The npm package react-file-input receives a total of 925 weekly downloads. As such, react-file-input popularity was classified as not popular.
We found that react-file-input demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.