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>

<option>

The <option> element represents an input choice within a <select-single> or <select-multiple>. Options can be selected or deselected, which can be expressed visually using the "selected" style modifier.

<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>

Structure

A <option> element can appear anywhere within a <select-single> or <select-multiple> element.

Attributes

  • value
  • style
  • id
  • hide
  • collapsable
  • collapsable-children

value

TypeRequired
stringNo (defaults to blank)

The value of the option. When selected, this value will be included in the <form> data sent with remote requests.

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 an <option> element.

<option> supports the selected style modifier. See Modifiers for more details.

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.

collapsable

TypeRequired
true (default), falseNo

When this element is only used to lay out its children, it may be automatically removed from the native view hierarchy as an optimization. Setting collapsable="false" disables this optimization and ensures the element exists in the native view hierarchy. See the React Native docs for details.

collapsable-children

TypeRequired
true (default), falseNo

Setting collapsable-children="false" prevents the direct children of this element from being removed from the native view hierarchy, similar to setting collapsable="false" on each child. See the React Native docs for details.

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