Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save katendeglory/e0867cdd870651ef1d339196a5c03d74 to your computer and use it in GitHub Desktop.
Save katendeglory/e0867cdd870651ef1d339196a5c03d74 to your computer and use it in GitHub Desktop.
Tailwind custom file upload component
<label
for="watch-photos"
class="flex items-center"
style="display: flex !important;"
>
<ion-icon name="images" class="text-2xl mr-3" />
Upload Some Photos
</label>
{#if newWatch.photos}
<span class="text-red-300 my-1 text-sm tracking-wider">
{newWatch.photos.length} Photo Selected
</span>
{/if}
<div class="hidden">
<input
bind:files={newWatch.photos}
type="file"
multiple
placeholder="Passport"
accept="image/*"
id="watch-photos"
class="appearance-none"
/>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment