Moduli v1.0.0

Caricamento file

Un componente di caricamento file con trascinamento e supporto anteprima. Supporta sia la modalità form builder (con oggetti form di Rails) che l'uso autonomo. Mostra anteprime per le immagini e informazioni sul file per gli altri tipi.

Anteprima e Codice

Opzioni

Nome Tipo Predefinito Descrizione
form FormBuilder nil Rails form builder object (for form builder mode)
attribute Symbol nil Model attribute name (for form builder mode)
name String nil Input name attribute (for standalone mode)
label String nil Label text (auto-generated from attribute if not provided)
hint String nil Help text displayed below the dropzone
accept String nil Accepted file types (e.g., 'image/*', '.pdf,.doc')
multiple Boolean false Whether multiple files can be selected
max_size Integer nil Maximum file size in bytes
required Boolean false Whether a file is required
disabled Boolean false Whether the upload is disabled
error String nil Manual error message (auto-detected from form object if not provided)
class String "" Additional CSS classes for the container

Registro delle modifiche v1.0.0

- Initial release with form builder and standalone modes
- Drag-and-drop file selection
- Image preview support
- File size and type validation
- Multiple file upload support
- Dark mode support

Ottieni l'Accesso Completo

Sblocca il codice sorgente di questo componente e di tutti gli altri. Un solo pagamento per l'accesso a vita.

Ottieni l'Accesso Ora