Primitives / Interaction
In the examples
Each of these composes the primitives above into a working widget. Read
app.ts for the placements and update, and view.ts for the Behaviors on
the slots.
| Widget | Primitives |
|---|---|
| Toolbar | RovingTabindex |
| One-time code field | RovingTabindex, a filled cell moving focus with a Command |
| Toggle group, checkbox group | Selection |
| Command menu | ListNavigation, Selection, Placing |
| Autocomplete | ListNavigation, Selection, DismissLayer, Overlay.nonModal, Placing |
| Context menu | ListNavigation, Selection, DismissLayer, Overlay.nonModal, Placing |
| Menubar | RovingTabindex across the bar, ListNavigation in each menu |
| Alert dialog | DismissLayer, Overlay.modal with outside press and Escape turned off |
| Drawer | DismissLayer, Overlay.modal |
| File tree | TreeNavigation, Selection |
The widgets run together at foldkit-widgets-demo.pages.dev.
Failure
A Behavior writes data, so a view that stops attaching it leaves nothing
behind. The resolver refuses two owners of one event on a slot (Press with
LongPress, RovingTabindex with Typeahead): take ListNavigation or pick
one. Without a DOM a Mount here emits nothing.