Skip to content

File input

A styled native file picker, and a drag-and-drop zone that wraps one.

CSS + mian.js JSON Markdown Registry item

Basic

Dropzone

Installation

Everything ships in one stylesheet and one small script. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">
<script src="https://mian.ro/dist/mian.js" defer></script>

Prefer to own the files? /r/file-input.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-fileOn an <input type="file">.
mn-dropzoneA <label> containing a file input. Accepts drops; shows the chosen names in [data-mn-file-name].

Accessibility

  • The dropzone is a label for a real file input, so it is keyboard and screen-reader operable. Dragging is an enhancement, not the only path.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page