Combo Box
Filter and select from suggestions already on the page.
- Atlas
- Beacon
- Cobalt
- Drift
- No matches
HTML
<div class="rl-scope" data-rl-scope>
<div class="rl-field">
<label class="rl-label" for="demo-combo-box">Workspace</label>
<div class="rl-combo" data-rl-combo>
<input class="rl-input" id="demo-combo-box" name="q" type="text" role="combobox"
aria-expanded="false" aria-controls="demo-combo-box-options" aria-autocomplete="list"
autocomplete="off" placeholder="Find a workspace…">
<ul class="rl-listbox rl-combo-list" id="demo-combo-box-options" role="listbox" aria-label="Workspaces" hidden>
<li class="rl-option" id="demo-combo-box-atlas" role="option" aria-selected="false">Atlas</li>
<li class="rl-option" id="demo-combo-box-beacon" role="option" aria-selected="false">Beacon</li>
<li class="rl-option" id="demo-combo-box-cobalt" role="option" aria-selected="false">Cobalt</li>
<li class="rl-option" id="demo-combo-box-drift" role="option" aria-selected="false">Drift</li>
<li class="rl-option" role="option" aria-disabled="true" data-rl-empty-option hidden>No matches</li>
</ul>
<span class="rl-description" data-rl-combo-status role="status"></span>
</div>
</div>
</div>Type to filter. Use the arrow keys and Enter to select an option. A named input submits the chosen text.
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>