Saltearse al contenido

File

Esta página aún no está disponible en tu idioma.

You can use the File to handle file inputs. It supports single and multiple files.

<script lang="ts">
import { File } from "@tuentyfaiv/svelte-form";
</script>
<File name="cover" />
<!-- Or -->
<File name="cover">
Custom label
<svelte:fragment slot="preview" let:cover>
Custom preview
<img src={cover.src} alt={cover.alt} />
</svelte:fragment>
<svelte:fragment slot="retry">
Retry
</svelte:fragment>
<svelte:fragment slot="error" let:error>
{formatError(error)}
</svelte:fragment>
</File>

Single image

Multiple images

Single not image

Multiple not images

Disabled