Stylish File Uploader - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Stylish File Uploader</title> <style> body { font-family: 'Arial', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .uploader { width: 400px; height: auto; padding: 30px; background: #fff; border-radius: 10px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); text-align: center; position: relative; overflow: hidden; transition: transform 0.5s; } .uploader:hover { transform: scale(1.05); } .uploader .icon { font-size: 50px; color: #ff4757; animation: bounce 2s infinite; } @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } .uploader h2 { font-size: 24px; margin: 20px 0; color: #2f3542; } .uploader p { font-size: 16px; color: #57606f; margin-bottom: 20px; } .uploader input[type="file"] { position: absolute; width: 100%; height: 100%; top: 0; left: 0; opacity: 0; cursor: pointer; z-index: 2; } .uploader .custom-file-upload { display: inline-block; padding: 15px; background: #1e90ff; border: none; border-radius: 30px; color: #fff; font-size: 16px; cursor: pointer; transition: background 0.3s; z-index: 1; position: relative; } .uploader .custom-file-upload:hover { background: #3742fa; } .uploader .uploaded-list { margin-top: 20px; text-align: left; max-height: 150px; overflow-y: auto; padding: 0; } .uploader .uploaded-list li { background: #f1f2f6; margin-bottom: 10px; height: 50px; padding: 0; padding-left: 5%; padding-right: 5%; border-radius: 5px; display: flex; align-items: center; justify-content: space-between; } .uploader .uploaded-list li span { font-size: 14px; color: #2f3542; } .uploader .uploaded-list li .delete { cursor: pointer; color: #ff4757; } </style> </head> <body> <div class="uploader"> <div class="icon">📁</div> <h2>Upload Your Files</h2> <p>Click the button below to upload files</p> <label class="custom-file-upload"> <input type="file" id="file-input" class="file-input" multiple> Choose Files </label> <ul class="uploaded-list" id="uploaded-list"></ul> </div> <script> document.getElementById('file-input').addEventListener('change', function(event) { const files = event.target.files; const uploadedList = document.getElementById('uploaded-list'); uploadedList.innerHTML = ''; for (let i = 0; i < files.length; i++) { const listItem = document.createElement('li'); listItem.innerHTML = `<span>${files[i].name}</span><span class="delete">❌</span>`; uploadedList.appendChild(listItem); listItem.querySelector('.delete').addEventListener('click', function() { listItem.remove(); }); } }); </script> </body> </html>