File Components

Examples

A profile picture is useful to confirm your are logged into your account
<script>
import { Fileupload } from 'flowbite-svelte'

let fileuploadprops = {
  id : 'user_avatar',
  label : 'Upload file'
}

let fileuploadprops2 = {
  id : 'user_avatar',
  label : 'Upload file',
  helper : 'A profile picture is useful to confirm your are logged into your account'
}
</script>

<Fileupload {...fileuploadprops} />
<Fileupload {...fileuploadprops2} />

Props

The component has the following props, type, and default values. See type-list page for type information.

Name Type Default
value string ''
id string 'user_avatar'
label string 'Upload file'
labelClass string 'block mb-2 text-sm font-medium text-gray-900 dark:text-gray-300" for="user_avatar'
inputClass string 'block w-full text-sm text-gray-900 bg-gray-50 rounded-lg border border-gray-300 cursor-pointer dark:text-gray-400 focus:outline-none focus:border-transparent dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400'
divClass string 'mt-1 text-sm text-gray-500 dark:text-gray-300'
helper string ''

Checkbox

File input

Floating label

Input

Radio

Range

Search

Select

Textarea

Toggle

References

Flowbite Forms