Native Select

An abstraction over a HTML <select> element that embeds some <option> elements. We build an array describing data for each option, and provide it to the data attribute. The data for an option is a record with a label and a value.

If the label is the same as the value (not recommended), we may provide a string instead of a record, which acts as both label and value.

  • data: an array of {label,value} elements.
  • label: The label that describes the select
const options = [
    { label: "Death Knight", value: "deathKnight" },
    { label: "Demon Hunter", value: "demonHunter" },
]

const options = ["deathKnight", "demonHunter"]
<NativeSelect data={options} label="Class" />
earlymorning logo

© 2025 - All rights reserved

Native Select

An abstraction over a HTML <select> element that embeds some <option> elements. We build an array describing data for each option, and provide it to the data attribute. The data for an option is a record with a label and a value.

If the label is the same as the value (not recommended), we may provide a string instead of a record, which acts as both label and value.

  • data: an array of {label,value} elements.
  • label: The label that describes the select
const options = [
    { label: "Death Knight", value: "deathKnight" },
    { label: "Demon Hunter", value: "demonHunter" },
]

const options = ["deathKnight", "demonHunter"]
<NativeSelect data={options} label="Class" />