UI index: what to use for a need
Before drawing anything with egui’s own widgets, look here: each row maps a need to the egui-pop call that answers it, themed by the kit, named for screen readers and agents. A need missing here is a gap to fill in egui-pop, not a reason to hand-draw it.
ui.* methods come from the UiPop trait, in egui_pop::prelude.
To add an entry, give the item a doc line
/// Need (group): a search field., the group one of: text, layout, action, input, state, status, icon, help, dialog, data, image.
Text and titles
| Need | Use | What it is |
|---|---|---|
| a heading over a group of fields | ui.section_title(..)egui_pop::core::ui::UiPop::section_title | A section’s title (text-role.section). |
| a label in a named text role (title, section, body, muted, meta) | ui.text_role(..)egui_pop::core::ui::UiPop::text_role | A label in a text role (role_text). |
| a section title | ui.section_title(..)egui_pop::core::ui::UiPop::section_title | A section’s title (text-role.section). |
| greyed or weak text | ui.muted(..)egui_pop::core::ui::UiPop::muted | Secondary text: a hint, a description (text-role.muted). |
| monospace text, a log or console line, a path or code | ui.code_text(..)egui_pop::core::ui::UiPop::code_text | Monospace text: a log’s or a console’s line, a path, a piece of code. |
| secondary text, a hint or a description | ui.muted(..)egui_pop::core::ui::UiPop::muted | Secondary text: a hint, a description (text-role.muted). |
| small print about an item, a date or a size | ui.meta(..)egui_pop::core::ui::UiPop::meta | Small print about an item: a date, a size (text-role.meta). |
| strong or bold text inline, a word that must stand out | ui.strong_text(..)egui_pop::core::ui::UiPop::strong_text | Inline emphasis: a word or a value that must stand out in running text, at the body’s size in a heavier weight (text-role.strong, strong_text). |
| text in a tone, a failed state or an error in the danger colour | ui.text_tone(..)egui_pop::core::ui::UiPop::text_tone | Text in a tone: a failed state, an error, a warning, a success. |
Spacing, cards and scrolling
| Need | Use | What it is |
|---|---|---|
| a card, a framed group | ui.card(..)egui_pop::core::ui::UiPop::card | add inside the kit’s card in a tone (Tone::Neutral for the plain card). |
| a divider, a rule between two sections (separator) | ui.divider(..)egui_pop::core::ui::UiPop::divider | A divider: a rule across the layout between two sections, in border.default, one point wide on whole physical pixels, centred in a space of Space::Group. |
| a group that folds and opens inside a panel (a disclosure, a collapsing header) | Foldegui_pop::core::fold::Fold | A group inside a panel whose header row folds and opens its body: a section band (disclosure mark, title, count) with optional actions at its right end, its body indented below it when open. |
| a panel opened several times at once, each instance with its own state | PanelSpecegui_pop::model::panels::PanelSpec | A panel as declared: its id, title, areas, sizes, and whether it opens once or as many times as asked (PanelSpec::instances). |
| a scrolling region | ui.scroll_area(..)egui_pop::core::ui::UiPop::scroll_area | Shows egui’s scroll area with its bars drawn from the kit’s scroll-bar (Stock::ScrollBar: the thumb’s fills and corners, the track), add its content, drawn in this Ui’s own style. |
| a tab bar button that moves a whole tab group into a window of its own | DockControlsegui_pop::api::workbench::DockControls | The controls the workbench’s docks show beyond the tabs, as the application sets them (AppBuilder::dock_controls). |
| a widget of a fixed size, filling its box (add_sized) | ui.sized(..)egui_pop::core::ui::UiPop::sized | widget in a box of size at the layout’s cursor, filling it (centred and justified along the layout’s direction): a row the width of its room, a field of a set width. |
| collapsible sections in a panel | Sectionsegui_pop::core::sections::Sections | A stack of collapsible sections filling the room it is given (a panel’s height), named for its memory and for agents. |
| content in a box of a fixed size (allocate_ui_with_layout) | ui.sized_ui(..)egui_pop::core::ui::UiPop::sized_ui | add in a box of exactly size at the layout’s cursor, laid out by layout (Layout::centered_and_justified to fill it): a cell of a set width in a row. |
| content placed in a given rectangle, clipped to it (put) | ui.rect_ui(..)egui_pop::core::ui::UiPop::rect_ui | add in rect, laid out by layout and clipped to it, for what places its parts by rectangles (a card laid out by a layout engine, a slot): nothing it draws goes past rect. |
| one of egui’s own widgets, styled by the kit | ui.scoped(..)egui_pop::core::ui::UiPop::scoped | add in a scope where egui’s own widgets of a Stock kind (buttons, combo boxes, text fields, buttons shown on or off) are drawn from the kit’s component, in a tone: its states become egui’s widget visuals, so egui keeps drawing the widget (Kit::scope). |
| open a closed panel again where it was, or in a given tab group | PanelOpenAskegui_pop::api::bus::PanelOpenAsk | A panel asked open: which panel, where, and who asks. |
| space between blocks, by intent (never a number of points) | ui.space_role(..)egui_pop::core::ui::UiPop::space_role | Space by intent along the layout’s direction (Space); egui’s own add_space takes points. |
Buttons and actions
| Need | Use | What it is |
|---|---|---|
| a button by tone (primary, danger, quiet) | ui.button_tone(..)egui_pop::core::ui::UiPop::button_tone | egui’s button in a tone of the kit’s button (button.tone.*): a Stock::Button scope (UiPop::scoped), so the button keeps its layout, icon and shortcut text. |
| a button with a menu of alternatives (split button) | input::split_button(..)egui_pop::core::input::split_button | A split button on its own: an action (text) and a chevron opening a menu of items. |
| a small (compact) button in a dense list row | RowButtonegui_pop::core::compact::RowButton | A button small enough for a list’s row (see the module). |
| a small frameless text button in a bar (a breadcrumb, a name in a title bar) | widgets::bar_text_button(..)egui_pop::core::widgets::bar_text_button | A frameless text button sized for a bar: small text, no box, as wide as its text, egui’s hover look (its text brightens under the pointer) and the focus ring when it has the keyboard. |
| an icon button | IconWidgetegui_pop::core::icon::IconWidget | An icon as a widget. |
| keys that work in every instance of a panel | CONTEXT_FOCUSED_PANEL_KINDegui_pop::api::app::CONTEXT_FOCUSED_PANEL_KIND | The context key holding the kind of the focused panel (PanelId::kind): the panel’s own id, or app.gallery while its instance app.gallery#2 has the focus, so one clause reaches every instance: when: "focusedPanelKind == 'app.gallery'". |
Fields and choices
| Need | Use | What it is |
|---|---|---|
| a checkbox | widgets::checkbox(..)egui_pop::core::widgets::checkbox | A checkbox (Checkbox): ui.checkbox, drawn through the kit. |
| a colour picked on a wheel | ColorWheelegui_pop::viewport::wheel::ColorWheel | A colour wheel, with its luminance slider. |
| a drop-down choice (combo box) | ui.combo_box(..)egui_pop::core::ui::UiPop::combo_box | Shows egui’s combo box (widgets::combo_box, for the kit’s arrow) with its box drawn from the kit’s combo-box (Stock::ComboBox), add its list’s content: ComboBox::show_ui in a scope. |
| a file or folder path field | Input::path(..)egui_pop::core::input::Input::path | A path field. |
| a filter box | Input::search(..)egui_pop::core::input::Input::search | A search field: a magnifier before the query, clearable. |
| a masked field for a secret (token, API key) | Input::masked(..)egui_pop::core::input::Input::masked | A masked text field (a password, a token, a key): every character a bullet, nothing to copy, and its value never given to assistive technologies or agents, only its name. |
| a multi-line text field (a description, notes) | Input::multiline(..)egui_pop::core::input::Input::multiline | A multi-line text field: rows lines tall, growing with its text up to max_rows, then scrolling; Enter starts a new line, Ctrl+Enter submits (see submit_on_enter). |
| a number field with a unit | Input::number(..)egui_pop::core::input::Input::number | A number field: a number or an expression (x * 2, 1,5), committed when it loses the focus. |
| a number field with steps and limits | NumberInputegui_pop::core::number::NumberInput | A number input; see the module. |
| a password field | Input::masked(..)egui_pop::core::input::Input::masked | A masked text field (a password, a token, a key): every character a bullet, nothing to copy, and its value never given to assistive technologies or agents, only its name. |
| a rotary knob | Knobegui_pop::core::knob::Knob | A rotary knob over an f64. |
| a search field | Input::search(..)egui_pop::core::input::Input::search | A search field: a magnifier before the query, clearable. |
| a single-line text field | Input::text(..)egui_pop::core::input::Input::text | A text field named label (for assistive technologies and agents; the label itself is drawn by the form around it). |
| a slider over a number | Slideregui_pop::core::slider::Slider | A slider over an f64. |
| a star rating | RatingStarsegui_pop::core::rating::RatingStars | Five stars (see the module). |
| a text area that grows with its text | Input::multiline(..)egui_pop::core::input::Input::multiline | A multi-line text field: rows lines tall, growing with its text up to max_rows, then scrolling; Enter starts a new line, Ctrl+Enter submits (see submit_on_enter). |
| a text field with a placeholder | Input::text(..)egui_pop::core::input::Input::text | A text field named label (for assistive technologies and agents; the label itself is drawn by the form around it). |
| a toggle chip, a filter turned on or off | ToggleChipegui_pop::core::widgets::ToggleChip | A small toggle showing a short text or a glyph, on while selected: its box is the kit’s toggle-chip component (based on selectable-row), its text or glyph in the state’s text. |
| an on/off switch (a toggle with a track and a thumb) | Switchegui_pop::core::widgets::Switch | An on/off switch: a track (the kit’s switch component, selected while on) and a round thumb, at the track’s start while off and at its end while on, in the state’s text; its label after it, in the text of the same state off. |
| one choice among a few (radio buttons) | widgets::radio_value(..)egui_pop::core::widgets::radio_value | A radio button setting current to alternative when clicked: ui.radio_value, drawn through the kit. |
| one mode among a few, as a segmented control or a tab strip | Segmentedegui_pop::core::segmented::Segmented | A segmented control: a row of exclusive options, one selected (a view’s modes, a panel’s tabs), as Mantine’s SegmentedControl, Ant’s Segmented or libadwaita’s AdwToggleGroup have it. |
Loading, empty and progress
| Need | Use | What it is |
|---|---|---|
| a busy spinner | Spinneregui_pop::core::progress::Spinner | A spinner, with a label after it; Spinner::delayed shows it only after motion.spinner.delay, and keeps it motion.spinner.min. |
| a place shown by its kind with its state on it (a node glyph with an offline mark) | .badge_icon(..)egui_pop::api::files::places::PlaceItem::badge_icon | A state badge on the corner of the kind icon: an icon of the icon registry (phosphor:cloud-slash) and its tooltip (Offline), the tooltip shown when the pointer is on the badge and said in the item’s description. |
| a place shown out of reach but still choosable (a folder of an offline volume) | .dimmed(..)egui_pop::api::files::places::PlaceItem::dimmed | Drawn muted and said to be unavailable (see PlaceItem::dimmed): an offline volume’s folders, still choosable. |
| a progress bar | ProgressBaregui_pop::core::progress::ProgressBar | A progress bar. |
| a small circular progress | Ringegui_pop::core::progress::Ring | A small circular progress: determinate (an arc from the top) or indeterminate (a turning arc). |
| a value or a list still loading | Skeletonegui_pop::core::placeholder::Skeleton | Grey shapes standing in for content. |
| a value still loading | Spinneregui_pop::core::progress::Spinner | A spinner, with a label after it; Spinner::delayed shows it only after motion.spinner.delay, and keeps it motion.spinner.min. |
| an empty state, nothing here yet | EmptyStateegui_pop::core::placeholder::EmptyState | An empty place: an icon, a title, a sentence, an action. |
| no results for a search or a filter | EmptyStateegui_pop::core::placeholder::EmptyState | An empty place: an icon, a title, a sentence, an action. |
| placeholder shapes while content loads | Skeletonegui_pop::core::placeholder::Skeleton | Grey shapes standing in for content. |
Status marks and badges
| Need | Use | What it is |
|---|---|---|
| a colour swatch | Indicatoregui_pop::core::indicator::Indicator | A micro-indicator, built then added inline (ui.add) or painted on a widget (Indicator::on, Indicator::paint_at). |
| a level against thresholds (disk space, memory) | Meteregui_pop::core::progress::Meter | A value against thresholds (disk space, memory), not progress: a bar whose tone follows the highest threshold reached. |
| a status dot, a LED, a count badge or a flag | Indicatoregui_pop::core::indicator::Indicator | A micro-indicator, built then added inline (ui.add) or painted on a widget (Indicator::on, Indicator::paint_at). |
| an inline error, warning or success message | ui.text_tone(..)egui_pop::core::ui::UiPop::text_tone | Text in a tone: a failed state, an error, a warning, a success. |
Icons and glyphs
| Need | Use | What it is |
|---|---|---|
| a small mark by meaning (disclosure, sort, check, close) | Glyphegui_pop::core::kit::Glyph | What a small mark means. |
| an icon as a widget (sized, toned, clickable) | IconWidgetegui_pop::core::icon::IconWidget | An icon as a widget. |
| an icon by name | Iconegui_pop::core::icon::Icon | What an icon means. |
Tooltips, hover cards and notices
| Need | Use | What it is |
|---|---|---|
| a hover card, a rich tooltip with rows and links | HoverCardegui_pop::core::hover_card::HoverCard | A hover card next to a widget. |
| a toast, a short notice that fades | Toastsegui_pop::api::toasts::Toasts | The queue of toasts. |
| a tooltip | .tip(..)egui_pop::core::tooltip::TooltipExt::tip | Shows text in the kit’s tooltip while the widget is hovered and enabled, as Response::on_hover_text does with egui’s. |
| an inline message (an error, a warning, a success) in sentences, selectable and copyable | Noteegui_pop::core::note::Note | An inline message in sentences: see the module. |
| why a control is disabled | .disabled_tip(..)egui_pop::core::tooltip::TooltipExt::disabled_tip | Shows text in the kit’s tooltip while the widget is hovered and disabled (the reason it is), as Response::on_disabled_hover_text. |
Dialogs, menus and pages
| Need | Use | What it is |
|---|---|---|
| a command palette | Paletteegui_pop::api::palette::Palette | The palettes’ state, one per window group (AppHandle::window_group): open or not, the query. |
| a command row with its shortcut in a menu drawn by hand | menus::command_row(..)egui_pop::api::menus::command_row | A command row in a menu drawn by hand (a popup or context menu built in a closure), drawn as the declared menus’ command rows: the kit’s menu-item, its label at the start, shortcut (the keys’ text, such as Ctrl+C) muted at the end in the menu’s key font. |
| a confirmation dialog | Confirmegui_pop::api::dialogs::Confirm | A question before an action: a primary button and Cancel, or, with a Secondary, the classic three buttons (“Save”, “Don’t save”, “Cancel”) in the platform’s order (ButtonOrder). |
| a file or folder picker | FileBrowseregui_pop::api::files::browser::FileBrowser | The file browser: entries from a FileSource, shown by a ViewMode chosen in its toolbar (or with Ctrl+1 to Ctrl+9), kept per dialog in the host’s store when drawn with FileBrowser::show_in. |
| a popover’s surface in an area the application places itself | ui.popover(..)egui_pop::core::ui::UiPop::popover | add on the kit’s popover surface (its popover component, with egui’s popup shadow): the look of egui-pop’s own popovers, for an area the application places itself (a first-run notice, a hint by a control), outside the overlay stack. |
| a quick pick, a filtered list of choices in the palette | QuickPickegui_pop::api::palette::QuickPick | A list of choices the palette offers in place of the commands (Palette::pick_in): typed text filters them by a fuzzy match of their labels, Enter runs the selected one’s command, Escape closes. |
| a settings or admin page declared as a manifest | Adminegui_pop::api::admin::Admin | The administration app’s state, manifests, hooks, widget kinds and value layers. |
| a side panel of places whose rows are drop targets or drag sources | .on_row(..)egui_pop::api::files::places::PlacesPanel::on_row | A hook called with each item’s row and its response, after the panel’s own handling: the application attaches what the panel knows nothing of (a drop target or a drag source through the drag session, bus::drag; its own context menu; a tip). |
| a side panel of places, with sections of an application’s | PlacesPanelegui_pop::api::files::places::PlacesPanel | A side panel of places: sections, each a heading over its items, as the in-app picker lists them (an import window’s sources column). |
| a submenu in a context menu drawn by hand | menus::submenu(..)egui_pop::api::menus::submenu | A submenu item in a menu drawn by hand (a context menu built in a closure, egui_pop_core::pointer::claim::context_menu), drawn as the declared menus’ submenu items: the kit’s menu-item with the submenu arrow, selected while its submenu is open. |
| a three-button question (Save, Don’t save, Cancel) | Confirmegui_pop::api::dialogs::Confirm | A question before an action: a primary button and Cancel, or, with a Secondary, the classic three buttons (“Save”, “Don’t save”, “Cancel”) in the platform’s order (ButtonOrder). |
| ask before a destructive action | Confirmegui_pop::api::dialogs::Confirm | A question before an action: a primary button and Cancel, or, with a Secondary, the classic three buttons (“Save”, “Don’t save”, “Cancel”) in the platform’s order (ButtonOrder). |
Lists, trees and tables
| Need | Use | What it is |
|---|---|---|
| a list of places without a heading | PlaceSection::untitled(..)egui_pop::api::files::places::PlaceSection::untitled | A section without a heading: no title drawn and no fold arrow, its rows shown directly (a library’s top rows, “All photos”, above the titled sections). |
| a long list, virtualised | ListViewegui_pop::views::list::ListView | The list widget. |
| a narrow column of states headed by an icon | .header_icon(..)egui_pop::views::table::DataTable::header_icon | Shows column column’s header as an icon of the icon registry (phosphor:cloud-check) with a tooltip (Backed up), for a narrow column of states. |
| a narrow column’s header shown as an icon | .show_icon(..)egui_pop::core::widgets::SortHeader::show_icon | Draws it over rect with icon in its title’s place (a narrow column’s header): the title is no longer shown but stays its name for assistive technology, and the sort glyph follows the icon. |
| a row of a hand-built tree with its disclosure toggle (a folder tree in a side panel) | TreeRowegui_pop::core::fold::TreeRow | A row of a hand-built tree: a branch’s toggle, or a leaf’s room for one, then the row the caller draws; TreeRowResponse::body shows the rows below a branch, indented, when it is open. |
| a row picked from a short list | SelectableRowegui_pop::core::widgets::SelectableRow | A row picked from a short list: its box is the kit’s selectable-row component, selected for the chosen one (never hover then, so the choice stays visible under the pointer), its label in the state’s text. |
| a side panel of places with one selection in each section (scopes chosen together) | .selected_set(..)egui_pop::api::files::places::PlacesPanel::selected_set | The items shown selected, by id, beside PlacesPanel::selected: one in each section where the application’s scopes add up (a folder, an album and a keyword chosen together). |
| a sortable column header | SortHeaderegui_pop::core::widgets::SortHeader | A column’s header: its box is the kit’s table-header-cell component, selected while the rows are sorted by it, the direction the kit’s sort-ascending or sort-descending glyph after the title. |
| a table with sortable, resizable columns | DataTableegui_pop::views::table::DataTable | The data table widget. |
| a tree of places in a side panel (folders and their subfolders, nested keywords) | .children(..)egui_pop::api::files::places::PlaceItem::children | Items nested under it, after those it has: a branch of a tree (volume, folder, subfolders; Animals, Dog). |
| a tree of places whose levels are easy to follow (folders nested deep) | .indent_guides(..)egui_pop::api::files::places::PlacesPanel::indent_guides | When a tree section (PlaceItem::children) draws its indent guides, a thin line down each nesting level in the kit’s list-guide (list-guide.rest.border-color, border-width): never (the default), while the pointer is over the panel, or always, as VS Code’s renderIndentGuides. |
IndentGuidesegui_pop::core::fold::IndentGuides | When a hand-built tree draws its indent guides: a thin line down each nesting level, as VS Code’s explorer does (renderIndentGuides). | |
a tree row of compacted folders (a / b / c) whose each folder is clickable | .segments(..)egui_pop::api::files::places::PlaceItem::segments | Its name drawn as a compacted chain, a / b / c (egui-pop draws the separator, SEGMENT_SEPARATOR): each segment underlined under the pointer, its own click target and its own node for assistive technology, named by the chain up to it (a / b) or its PlaceSegment::name. |
| a tree, lazy and keyboard-driven | TreeViewegui_pop::views::tree::TreeView | The tree widget. |
| many rows of equal height, only the visible ones drawn | ui.scroll_area_rows(..)egui_pop::core::ui::UiPop::scroll_area_rows | UiPop::scroll_area for rows rows row_height high, the Ui’s item spacing apart: egui’s ScrollArea::show_rows, add given the rows in view. |
Images and imaging
| Need | Use | What it is |
|---|---|---|
| a colour wheel | ColorWheelegui_pop::viewport::wheel::ColorWheel | A colour wheel, with its luminance slider. |
| a curve editor | CurveEditoregui_pop::viewport::curve::CurveEditor | The curve editor. |
| a grid of thumbnails | ThumbnailGridegui_pop::core::thumbnail::ThumbnailGrid | thumbnail_grid with its options: where it keeps its scrolling, how high it gets, and a cell to bring into view, drawn or not. |
| a histogram | Histogramegui_pop::viewport::histogram::Histogram | The histogram widget. |
| a place shown by its picture (a camera’s photo) in a places list | .image(..)egui_pop::api::files::places::PlaceItem::image | An image in the icon’s place: a texture the application loaded (egui::load::SizedTexture), or a URI egui’s image loaders read (file://, bytes://, https://). |
| a zoom control | ZoomControlegui_pop::viewport::navigator::ZoomControl | The zoom control: zoom out, the zoom, zoom in, fit, 100 %. |
| an application’s logo in its own title bar, beside its name | .logo(..)egui_pop::api::frame::FramePlugin::logo | The application’s logo, drawn after the system menu button and before its name, a toolbar icon’s size (size.icon.toolbar), so the application keeps the frame’s menu block instead of replacing it. |
| an image navigator (overview with the visible area) | Navigatoregui_pop::viewport::navigator::Navigator | The navigator: the whole image and the part in view. |
| an image viewport (pan, zoom, tiles) | Viewportegui_pop::viewport::widget::Viewport | The viewport widget, built per frame. |