Hyperview

Hyperview

  • Guides
  • Examples
  • Reference
  • Blog

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

<doc>

The <doc> element represents the root of a Hyperview payload.

<doc xmlns="https://hyperview.org/hyperview">
  <screen id="main">
    <styles />
    <body />
  </screen>

  <screen id="preloadScreen">
    <styles />
    <body />
  </screen>
</doc>

In the example above, the screen with id "main" will be displayed. The screen with id "preloadScreen" will not be rendered, but can be used to display subsequent screens or to serve as a loading state for subsequent screens.

Structure

A <doc> element can only appear at the root of a Hyperview XML document. A doc can contain many <screen> elements, but only the first one will be rendered in the current screen. The other <screen> elements can be used to prefetch subsequent screens or indicators. <doc> may also contain a single <navigator> element but may not contain a combination of <screen> and <navigator> children.

Example <doc> with a <navigator> element

<doc xmlns="https://hyperview.org/hyperview">
  <navigator id="root" type="stack">
    <nav-route id="home" href="/home.xml" />
  </navigator>
</doc>

Attributes

The <doc> does not take any attributes. It's good to set the default XML namespace on the doc so that it applies as the default to all of the children:

<doc xmlns="https://hyperview.org/hyperview">
← Share<screen> →
  • Structure
  • Attributes
Hyperview
Docs
ExamplesHyperview Reference
More
BlogGitHub
Copyright © 2025 Instawork