24 September 2019

Snippet of a simple file field with original Semantic UI for React. Semantic UI is still missing a file field component. Other solution would be to use react-dropzone for creating a dropzone.

Source code viewer
  1. <Form.Input
  2. error={typeof this.state.errors.file_photo !== 'undefined' ? this.state.errors.file_photo : false}
  3. label="Photo"
  4. name="file_photo" >
  5. <input type="file" />
  6. </Form.Input>
Programming Language: ECMAScript