Reference · SemText · Disclosure & views
<sem-view>
SemText element
The name attribute labels the tab; the content inside is that view of the subject. With JavaScript off every view shows, each under its name.
Shares its schema with
<sem-views>
— the option bullets below belong to that element's contract.
No options beyond the global attribute catalog are stated for this tag.
Example
Live render boots with JavaScript — the authored source is alongside.
variant: no authored active — the first view shows
No view carries `active`: the runtime activates the first and mirrors that into `data-active`, exactly as if it were authored there. Switching moves only the `data-active` mirror — view content is never rewritten, so switching a hundred times loses nothing. JS-off every view renders stacked under its `name`.
Live render boots with JavaScript — the authored source is alongside.
variant: views with ids — deep links and sem-navigate
A view may carry its own `id`: the deep link `#shipping/helm` (container id / view id, or the lowercased `name` when the view has none) activates that view on load and on every hashchange, so a view is citable like any anchor. Every activation — click, arrow key or hash — dispatches `sem-navigate {id, name, index}` for readers that want to follow along.
Live render boots with JavaScript — the authored source is alongside.
variant: any content inside a view
A view is a container, not a paragraph: any content is legal inside it, including other SemText elements. This one carries a `sem-note`, which enhances (collapse toggle and all) whether or not its parent view is the active one — the pane keeps the whole family alive so a switch is instant and content-preserving.
Live render boots with JavaScript — the authored source is alongside.
Source: spec/schema/sem-views.md