Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
<div class="max-w-sm">
<div class="flex flex-col gap-2 w-full">
<label for="ui-file-field-a8a9c6d7" class="text-sm font-medium">Attachments</label>
<label for="ui-file-field-a8a9c6d7" class="relative flex cursor-pointer flex-col items-center gap-2 rounded-lg border-2 border-dashed p-6 text-center transition-colors border-input hover:bg-accent/50 data-[drag=true]:border-primary data-[drag=true]:bg-primary/5" data-controller="ui--file-field" data-ui--file-field-target="dropzone" data-action="dragover->ui--file-field#dragOver dragleave->ui--file-field#dragLeave drop->ui--file-field#drop"><i data-lucide="upload" class="inline-block shrink-0 w-6 h-6 text-muted-foreground" aria-hidden="true"></i>
<p class="text-sm text-muted-foreground"><span class="font-medium text-primary">Click to upload</span> or drag and drop</p>
<p class="text-xs text-muted-foreground empty:hidden" data-ui--file-field-target="filenames"></p>
<input id="ui-file-field-a8a9c6d7" type="file" class="sr-only" multiple="multiple" data-ui--file-field-target="input" data-action="change->ui--file-field#updateNames" aria-describedby="ui-file-field-a8a9c6d7-hint"></label>
<p id="ui-file-field-a8a9c6d7-hint" class="text-xs text-muted-foreground">Drop as many as you like</p>
</div>
</div>
1
2
3
<div class="max-w-sm">
<%= render(UI::FileField.new(label: "Attachments", hint: "Drop as many as you like", multiple: true)) %>
</div>