An open API service indexing awesome lists of open source software.

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

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;
}
```