Skip to content

Instantly share code, notes, and snippets.

@elldotbas
Created January 7, 2019 11:03
Show Gist options
  • Save elldotbas/6c5ba003c07f8dff4a65ebb9ccb15d66 to your computer and use it in GitHub Desktop.
Save elldotbas/6c5ba003c07f8dff4a65ebb9ccb15d66 to your computer and use it in GitHub Desktop.
semantic-ui file upload
<div class="ui middle aligned center aligned grid container">
<div class="ui fluid segment">
<input type="file" (change)="fileEvent($event)" class="inputfile" id="embedpollfileinput" />
<label for="embedpollfileinput" class="ui huge red right floated button">
<i class="ui upload icon"></i>
Upload image
</label>
<input type="file" (change)="fileEvent($event)" class="inputfile" id="embedpollfileinput" />
<label for="embedpollfileinput" class="ui huge green right floated button">
<i class="ui upload icon"></i>
Upload image
</label>
</div>
</div>
.grid.container {
margin-top: 5em;
}
.inputfile {
width: 0.1px;
height: 0.1px;
opacity: 0;
overflow: hidden;
position: absolute;
z-index: -1;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.2.13/semantic.min.css" rel="stylesheet" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment