Image Upload

The Image Upload component is an input field to to upload images

Use the ImageUploadInput component to render a checkbox input:

import { ImageUploadInput } from '~/core/ui/ImageUploadInput'; import { Label } from '~/core/ui/Label'; <Label> Avatar <ImageUploadInput> Load an image from your computer </ImageUploadInput> </Label>

Props

The component, in addition to all the properties of the HTML input element, accepts the following props:

  1. image - an initial image to display in the component (the URL of the image)
  2. onClear - a callback function to be called when the user clicks the clear button

Subscribe to our Newsletter
Get the latest updates about React, Remix, Next.js, Firebase, Supabase and Tailwind CSS