File Input
View OriginalA drag-and-drop file input component that allows users to browse or drag files into a drop zone.
Goshtoso Component
Go + TemplDrag and Drop
Cover Picture
or drag and drop here
PNG, JPG, WebP - Max 5MBRequired
Upload Document
or drag and drop here
PDF, DOC, DOCX - Max 10MBDisabled
Disabled Upload
or drag and drop here
Uploads are currently disabledWithout Label
or drag and drop here
Any image or PDF - Max 5MBUsage Example
// Basic file input with drag and drop
@fileinput.FileInput(fileinput.Config{
ID: "coverPicture",
Name: "cover",
Label: "Cover Picture",
Accept: "image/*",
HelperText: "PNG, JPG, WebP - Max 5MB",
})
// Required file input
@fileinput.FileInput(fileinput.Config{
ID: "document",
Name: "document",
Label: "Upload Document",
Accept: ".pdf,.doc,.docx",
HelperText: "PDF, DOC, DOCX - Max 10MB",
Required: true,
})
// Disabled file input
@fileinput.FileInput(fileinput.Config{
ID: "disabled",
Name: "disabled",
Label: "Disabled Upload",
Disabled: true,
})