<view>
The basic container, like a <div>. Use it for layout, backgrounds, borders and tap targets.
Usage
Import LYNX_ELEMENTS in your component (see Elements).
Children stack vertically by default, and text goes in a <text>. See CSS on Lynx for layout.
Attributes
These attributes work on every element, not only <view>.
Events
These events work on every element. Read the payload from $event.detail (see Handling taps and events).
Only touch events (taps, long presses, and touch start, move, end and cancel) bubble. Each also has a catch form (catchtap) that stops bubbling, and capture-bind/capture-catch forms for the capture phase.
Methods
These UI methods (Glossary) work on every element. Call them with invoke() on the element (see Call element methods). A call from a handler returns nothing: to read a result, call invoke() in a main-thread script instead.
Related
- Elements and layout: how Lynx elements replace HTML
- CSS on Lynx: layout defaults and what CSS works
- Handling taps and events
<text>and<block>
