Skip to content
  1. Docs
  2. enzUI framework
  3. 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 Enz plus 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.

rust
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.

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.

sh
cargo run -p enzui-widgets --example gallery --features emoji-picker
VariableEffect
ENZUI_GALLERY_PAGE=InputOpen 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=1Start in the light theme instead of dark
ENZUI_GALLERY_ONLY=enz_slider,enz_toggleShow 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.

The gallery's Text and content page

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.

The gallery's Buttons page

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.

The gallery's Text input and forms page

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.

The gallery's Selection page

The gallery's Date, colour and emoji page

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.

The gallery's Navigation page

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.

The gallery's Layouts page

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.

The gallery's Containers and surfaces page

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.

The gallery's Tables and lists page

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.

The gallery's Charts page

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.

The gallery's Images and SVG page

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.

The gallery's Overlays and dialogs page

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.

The gallery's Feedback and progress page

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) and zoom_wheel. See Drag and drop.
  • Decoration: elevation (a semantic 0–5 shadow level resolved from the theme, so two widgets at one level match), glow and gradient_background.

Choosing between siblings

If you are choosing betweenAskUsually pick
app_shell, navigation_split_viewIs 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_headerIs 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_groupSwitching whole views, a segmented control within content, or a form value?radio_group for a form value
chat_list, chat_transcriptLong, virtualised history or a presentational column?chat_list for long histories
card, group_box, preferences_group, section_headerA discrete entity, a page section, a settings group, or a caption?card for an entity