Skip to content

File Field

Choose a file with a native file input styled like Mero buttons.

View template

PNG or SVG, at least 512 px square.

Use it in a plain <form method="post" enctype="multipart/form-data">. The browser shows the chosen file name next to the button. For your own echo, such as a list of several files, put an element with data-mero-file-name in the same mero-field.

Use in your app

Copy these tags into your page head once. Serve the files at the paths shown, then add the example’s template to your page.

Page assets
<link rel="stylesheet" href="/mero.css">
<script defer src="/mero.js"></script>
Download library and examples ↓