Hyperview

Hyperview

  • Guides
  • Examples
  • Reference
  • Blog

›Input Elements

Reference

  • Index

Behaviors

  • Behavior Attributes
  • <behavior>
  • Alert
  • Share

Display Elements

  • <doc>
  • <screen>
  • <header>
  • <body>
  • <view>
  • <text>
  • <image>
  • <list>
  • <section-list>
  • <section>
  • <section-title>
  • <items>
  • <item>
  • <spinner>
  • <web-view>

Input Elements

  • <form>
  • <text-field>
  • <select-single>
  • <select-multiple>
  • <option>
  • <picker-field>
  • <picker-item>
  • <switch>
  • <date-field>

Style Elements

  • <styles>
  • <style>
  • <modifier>

Hyperview Client

  • Hyperview component
  • Custom elements
  • Custom behaviors
  • Loading Screen

Hyperview Navigation

  • <navigator>
  • <nav-route>

<select-single>

The <select-single> element represents a user input widget that allows one option to be selected. <select-single> contains <option> elements and ensures that only one of those options can be selected at any given time.

<form>
  <select-single name="grade">
    <option value="1" selected="true">
      <text>1st grade</text>
    </option>

    <option value="2">
      <text>2nd grade</text>
    </option>

    <option value="3">
      <text>3rd grade</text>
    </option>
  </select-single>
</form>

If the user presses "2nd grade", the <option> element with value="2" will get the attribute selected="true", while the first option will get selected="false".

Structure

A <select-single> element most often appears within a <form> element. However, this is not a requirement, and the element can be used for local interactions that don't get serialized in a form (for example, to implement a tab interface).

Attributes

  • name
  • style
  • id
  • hide
  • allow-deselect

name

TypeRequired
stringYes

The name of the selection input within a <form> element. This name will be used when serializing a form to form data that gets sent in a server request.

style

TypeRequired
stringNo

A space-separated list of styles to apply to the element. See Styles. Note that text style rules cannot be applied to a <select-single>.

id

TypeRequired
stringNo

A global attribute uniquely identifying the element in the whole document.

hide

TypeRequired
false (default), trueNo

If hide="true", the element will not be rendered on screen. If the element or any of the element's children have a behavior that triggers on "load" or "visible", those behaviors will not trigger while the element is hidden.

allow-deselect

TypeRequired
false (default), trueNo

If allow-deselect="true", the <option> element can be deselected.

← <text-field><select-multiple> →
  • Structure
  • Attributes
Hyperview
Docs
ExamplesHyperview Reference
More
BlogGitHub
Copyright © 2025 Instawork