File Field
Choose a file with a native file input styled like Mero buttons.
PNG or SVG, at least 512 px square.
HTML
<div class="mero-scope" data-mero-scope>
<div class="mero-field">
<label class="mero-label" for="demo-file-field">Favicon</label>
<input class="mero-file" id="demo-file-field" name="favicon" type="file" accept="image/png,image/svg+xml" aria-describedby="demo-file-field-hint">
<p class="mero-description" id="demo-file-field-hint">PNG or SVG, at least 512 px square.</p>
</div>
</div>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>