Skip to content
ts
import ImageInput from '~/ui/ImageInput.vue'

Image input

Allow users to upload and preview images

ts
const props = defineProps<WithAttributes<{
  class: {
    color?: 'color-default-solid'
  }

  label?: string
  placeholder?: string

  /**
   * Absolute URL of previously uploaded image to compare against
   */
  referenceSrc?: string

  required?: boolean
  disabled?: boolean
} & Labeled>>()
ts
const model = defineModel<File | null>()