Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 1.15 KB

vaadin-directory-description.md

File metadata and controls

34 lines (26 loc) · 1.15 KB

<vaadin-select>

Available in Vaadin_Directory

<vaadin-select> is a Web Component similar to a native browser select element, part of the Vaadin components.

Screenshot of vaadin-select

Example Usage

<vaadin-select></vaadin-select>
<script>
  document.querySelector('vaadin-select').renderer = root => {
    if (root.firstElementChild) {
      return;
    }

    // Note that innerHTML is only used for demo purposes here!
    // Prefer using a templating library instead.
    root.innerHTML = `
      <vaadin-list-box>
        <vaadin-item>Option one</vaadin-item>
        <vaadin-item>Option two</vaadin-item>
        <vaadin-item>Option three</vaadin-item>
        <hr>
        <vaadin-item disabled>Option four</vaadin-item>
      </vaadin-list-box>
    `;
  };
</script>