https://github.com/izzyjere/codelabs.dragzoneinputfile
Drag Zone File Input Component
https://github.com/izzyjere/codelabs.dragzoneinputfile
Last synced: 4 months ago
JSON representation
Drag Zone File Input Component
- Host: GitHub
- URL: https://github.com/izzyjere/codelabs.dragzoneinputfile
- Owner: izzyjere
- Created: 2023-09-02T09:50:13.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-04-20T01:45:52.000Z (about 2 years ago)
- Last Synced: 2025-06-22T05:46:51.678Z (12 months ago)
- Language: HTML
- Size: 218 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Codelabs.DragZoneInputFile
Drag Zone File Input Component
# How to use
Install the nuget package
```shell
NuGet\Install-Package DragZoneInputFile -Version 8.0.1
```
# In your razor component
```razor
@page "/"
@using DragZoneInputFile
File Name: @_fileNames
@code{
string _fileNames = string.Empty;
private void OnFileUploadComplete(IEnumerable files)
{
// Do something with the files
foreach (var file in files)
{
_fileNames += $"{file.Name}, ";
//upload to server
}
}
}
```
# Customize various colors using following variables
```css
:root {
--drag-zone-bg-hover: #F3F3F4;
--drag-zone-bg-focus: #FFEBC6;
--drag-zone-border-focus: blue;
}
```