Open In App
Related Articles

ReactJS Evergreen Filepicker Component

Like Article
Save Article
Report issue

React Evergreen is a popular front-end library with a set of React components for building beautiful products as this library is flexible, sensible defaults, and User friendly. Filepicker Component allows the user to select one or multiple files from the file system. We can use the following approach in ReactJS to use the Evergreen Filepicker Component.

Filepicker Props:

  • name: It is used to denote the name attribute of the input.
  • accept: It is used to denote the accept attribute of the input.
  • required: It is used to make the Filepicker required when true.
  • multiple: It is used to accept multiple files when true.
  • disabled: It is used to disable the Filepicker when this is set to true.
  • capture: It is used to denote the capture attribute of the input.
  • height: It is used to denote the height of the file picker.
  • onChange: It is a function that is called when onChange is fired.
  • onBlur: It is a function that is called when onBlur is fired.
  • placeholder: It is used to denote the placeholder of the text input.
  • className: It is used to pass the class name for the Filepicker.

Creating React Application And Installing Module:

  • Step 1: Create a React application using the following command:

    npx create-react-app foldername
  • Step 2: After creating your project folder i.e. foldername, move to it using the following command:

    cd foldername
  • Step 3: After creating the ReactJS application, Install the required module using the following command:

    npm install evergreen-ui

Project Structure: It will look like the following.

Project Structure

Example: Now write down the following code in the App.js file. Here, App is our default component where we have written our code.


import React from 'react'
import { FilePicker } from 'evergreen-ui'
export default function App() {
  return (
    <div style={{
      display: 'block', width: 700, paddingLeft: 30
      <h4>ReactJS Evergreen FilePicker Component</h4>
        placeholder="Select your file"


Step to Run Application: Run the application using the following command from the root directory of the project:

npm start

Output: Now open your browser and go to http://localhost:3000/, you will see the following output:


Last Updated : 05 Jun, 2021
Like Article
Save Article
Share your thoughts in the comments
Similar Reads