- Docs
- enzUI framework
- Developers
Widgets by task
Every supported enzUI widget, grouped by what you are trying to do, with the gallery that shows them live.
enzUI ships 238 supported (tier-1) widget modules. Before building a widget, look for the job you need here: most of the cost of a missing widget is rebuilding one that already exists. The repository's docs/widgets.md is the full generated catalog, with an alias index you can search by intent ("segmented control", "spinbox", "empty state", "snackbar", "data grid"), and docs/widgets.json carries the same data in machine-readable form.
For a screenshot of every gallery specimen, see the widget catalog.
Naming and imports
One grammar runs through the whole library:
- The module is the unprefixed concept:
text,table,button,image. - The constructor is
enz_plus the concept:enz_text,enz_button,enz_disabled_button. - The builder type is
Enzplus the concept:EnzText,EnzButton. - Models, policies and helpers use ordinary Rust names:
TextSize,ToastHost,FileRequest.
Every constructor and builder is re-exported at the crate root, so enzui_widgets::enz_button and enzui_widgets::button::enz_button both resolve.
use enzui_widgets::{enz_badge, enz_button, enz_text};
use iced::Element;
#[derive(Debug, Clone)]
enum Message {
Save,
}
fn view<'a>() -> Element<'a, Message> {
let row = iced::widget::row![
enz_text("Unsaved changes").into_element(),
enz_badge("draft").into_element(),
enz_button("Save", Message::Save).into_element(),
]
.spacing(8);
row.into()
}Prefer a group's container over a bare iced::widget::container: the enzUI containers carry the token wiring and accessibility semantics. Only the tier-1 widgets are supported API; the crate also exports internal-composition and audit modules that can change without notice.
Run the gallery
The gallery example shows the library inside the app shell, one page per group, in light and dark. Each widget appears by name with a live preview, controls for some of its attributes, and the code that builds the preview as the controls set it.
cargo run -p enzui-widgets --example gallery --features emoji-picker| Variable | Effect |
|---|---|
ENZUI_GALLERY_PAGE=Input | Open on a page: Buttons, Input, Selection, Pickers, Navigation, Feedback, Charts, Data, Content, Containers, Layouts, Materials, Motion, Images or Dialogs (case does not matter) |
ENZUI_GALLERY_LIGHT=1 | Start in the light theme instead of dark |
ENZUI_GALLERY_ONLY=enz_slider,enz_toggle | Show only the named widgets |
Text and typography
enz_text draws text with the theme's type scale, semantic weights and tones. The group also covers label and value pairings, captions, measurement and whole-document renderers: label, icon_label, labeled_content, text_pair, section_header, window_title, streaming_text, markdown, reading_pane, block_list, code_block, paged_text_viewer (very large files), virtual_text_surface, text_grid, line_number_gutter, text_measure, selection_scope (read-only text selection) and wizard. See Text and text input.

Buttons and actions
Things the user clicks to cause something. button is the default, with kinds such as Primary, Secondary, Accent, Destructive and Quiet. The rest are shape variants or containers: button_group, link, toolbar_icon, sidebar_toggle_button, window_control_button, action_bar (folds commands into an overflow menu instead of clipping them), menu_button, menu_bar and mnemonic (access keys). pressable and clickable give button behaviour to any content.

Text input and forms
Widgets that read a value back. Each is controlled: it takes the current value plus a message constructor, and the app applies the edits. text_field, text_area, rich_edit, composer, secure_field, search_field, find_replace_bar, input_otp, stepper, chip_input, time_field, time_picker, slider, range_slider, checkbox, toggle, radio_group, key_capture_chip, emoji_picker and font_chooser, plus the containers form, form_layout, form_dialog, preferences_group and preferences_row.

Selection and pickers
Choosing one value out of many, where the set is too large or too visual for a radio group: combo_box, autocomplete_field, suggestion_list, command_palette, calendar, date_picker, date_range_picker, color_swatch, color_swatch_grid, color_picker and workspace_accent_chooser.


Navigation and app shell
The chrome around your content: app_shell, navigation_split_view, title_bar, titlebar_actions, window_controls, view_switcher, inline_view_switcher, tab_pill, document_tabs, breadcrumb, pagination, sidebar_row, header_bar, page_header, pane_header, pane_grid, toolbar_row, toolbar_view, status_bar and navigation_outlet. app_shell is the default for a top-level view; see App shell and titlebars.

Layout and spacing
Arrangement primitives with no visuals of their own, so spacing comes from the token scale and responsive decisions key off the component's width: stack (enz_vstack, enz_hstack), grid, responsive_grid, flow, wrap, center, clamp, aspect_ratio, adaptive_row, overflow_row, responsive, view_that_fits and cached_subtree.

Containers, surfaces and scrolling
Things that give content a background, border, radius or viewport. surface is the unopinionated base and card the common preset; pane, group_box, expander, disclosure, divider and hover_group cover the rest. If content can exceed its region, wrap it in scroll_view, scroll_column, scroll_card or horizontal_scroll_view instead of letting it overflow. glass, desktop_glass, adaptive_glass and grain are on Materials.

Lists, tables and virtualisation
virtual_list, virtual_grid, table and chat_list realise only the visible rows, which is what you want past a few hundred. Row widgets (list_row_surface, preview_row, table_header_cell, table_text_cell) are the cells you put inside them. The group also has tree_view, file_browser, reorder_list, keyed_column, schedule, carousel and print_pdf. See Lists and tables.

Charts and data visualisation
Canvas-backed plots: line_chart, area_chart, bar_chart, scatter_chart, pie_chart, cartesian_chart and sparkline, plus the shared chart_legend and chart_tooltip. Series colours come from the theme palette, so a chart re-themes with the rest of the app.

Media and imagery
Pictures, video and the surfaces drawn over them: image, async_image, animated_image, animated_svg, svg_image, image_viewer, image_cropper, video, media_controls, avatar, icon, qr and annotation_overlay. Playback widgets are driven by a snapshot of media state rather than owning a decoder. See Media and images.

Overlays, menus and dialogs
Anything drawn above the page. modal_host owns modality (scrim, background inertness, Escape, dismissal routing) and every dialog is presented through it: confirm_dialog, save_changes_dialog, form_dialog, settings_dialog, about_dialog, shortcuts_dialog, sheet and full_screen_overlay. Menus are the non-modal half: menu, menu_row, context_menu_host, popover and tooltip. See Dialogs, menus and popovers.

Feedback and progress
Telling the user what happened or is happening: banner, toast with toast_host, notice_stack, notification_inbox, activity_surface, status_dot, status_page, spinner, skeleton, progress_bar, progress_text, gauge, rating, badge and key_badge. Tone-carrying members publish live-region roles keyed off their tone, so a screen reader announces a warning with the right urgency.

Drag and drop, decoration
- Drag and drop:
drag_drop_host(one drag session across collections),drag_item_surface,drag_autoscroll_host,file_drop(files from other applications) andzoom_wheel. See Drag and drop. - Decoration:
elevation(a semantic 0–5 shadow level resolved from the theme, so two widgets at one level match),glowandgradient_background.
Choosing between siblings
| If you are choosing between | Ask | Usually pick |
|---|---|---|
app_shell, navigation_split_view | Is this the top-level view of an application? | app_shell; the split view only for an embedded pane or a host-drawn window |
title_bar, header_bar, toolbar_view, page_header | Is the band the window titlebar, a toolbar above content, or a routed page's header? | title_bar inside the shell for the window band |
view_switcher, inline_view_switcher, tab_pill, radio_group | Switching whole views, a segmented control within content, or a form value? | radio_group for a form value |
chat_list, chat_transcript | Long, virtualised history or a presentational column? | chat_list for long histories |
card, group_box, preferences_group, section_header | A discrete entity, a page section, a settings group, or a caption? | card for an entity |