Skip to main content

Module segmented

Module segmented 

Source
Expand description

VAPP-162 (docs/round-5-contract.md §3): Segmented orientation: vertical and option.count. A vertical bar is THE navigation rail: a column of fixed items (item = the rail’s width, 72 in every built-in theme, × $control.tabBar), laid out by the core (layout_tree). A bar item’s count is a badge at its icon’s top-end corner.

Functions§

badge_text
The badge text of an option’s count (99+ above 99); None when unset, not a positive number, or 0 (hidden). Only bar items paint it.
is_rail
Whether the Segmented is the navigation rail (a vertical bar).
is_vertical
Whether the Segmented stacks its segments top to bottom.
item_accessibility_label
The accessibility name of an item: the label, then the count (“Chats, 3”), when the item shows a badge.
item_count
The object options a Segmented paints.
option_badge
The badge of an option on a Segmented of variant (only bar paints one).
rail_height
The rail’s height: one tab_bar item per option.
rail_item
The item box of a rail at index (x, y, w, h) inside a rail width wide.