Expand description
gpui-component-style component library for egui 0.34, ported from
gpui-component.
All components are idiomatic egui widgets that return egui::Response.
Most can be added with ui.add(Button::primary("OK")); a few that need
to return extra info (e.g. Tag::show) provide a .show(ui) method.
Theming comes from egui_components_theme::Theme. Install it once at
startup:
egui_components_theme::Theme::dark().install(&ctx);Components read the installed theme via egui_components_theme::Theme::get.
Re-exports§
pub use accordion::Accordion;pub use alert::Alert;pub use avatar::Avatar;pub use avatar::AvatarShape;pub use avatar::AvatarStatus;pub use badge::Badge;pub use breadcrumb::Breadcrumb;pub use button::Button;pub use card::Card;pub use card::CardVariant;pub use checkbox::Checkbox;pub use collapsible::Collapsible;pub use common::Size;pub use common::Variant;pub use description_list::DescriptionList;pub use dialog::AlertChoice;pub use dialog::AlertDialog;pub use dialog::Dialog;pub use form::Form;pub use form::FormUi;pub use heading::Heading;pub use heading::HeadingLevel;pub use hover_card::HoverCard;pub use icon::Icon;pub use icon::IconKind;pub use input::Input;pub use label::Label;pub use label::LabelTone;pub use link::Link;pub use list::List;pub use list::ListItem;pub use menu::Menu;pub use notification::ToastAnchor;pub use notification::Toasts;pub use number_input::NumberInput;pub use otp_input::OtpInput;pub use pagination::Pagination;pub use popover::Popover;pub use progress::Progress;pub use radio::Radio;pub use rating::Rating;pub use resizable::Resizable;pub use scroll_area::ScrollArea;pub use select::Select;pub use separator::Separator;pub use sidebar::Rail;pub use sidebar::RailUi;pub use sidebar::Sidebar;pub use sidebar::SidebarUi;pub use slider::Slider;pub use switch::Switch;pub use tabs::TabVariant;pub use tabs::Tabs;pub use tag::Tag;pub use tag::TagResponse;pub use titlebar::TitleBar;pub use tooltip::Tooltip;pub use tree::show_themed as show_themed_tree;pub use tree::Tree;pub use egui_components_theme as theme;
Modules§
- accordion
Accordion— a single collapsible section with an animated chevron.- alert
Alertwidget — boxed inline message with optional title.- avatar
Avatar— a circular (or rounded-square) user thumbnail.- badge
Badgewidget — small inline pill / chip.- breadcrumb
Breadcrumb— a horizontal trail of navigable links.- button
Buttonwidget.- card
Card— a rounded surface that groups related content.- checkbox
Checkboxwidget.- collapsible
Collapsible— the low-level show/hide primitive behindAccordion.- common
- Shared types used across components.
- description_
list DescriptionList— term / description pairs (an HTML<dl>equivalent).- dialog
DialogandAlertDialog— modal overlays built onegui::Modal.- form
Form— vertical labeled-field layout.- heading
Heading— section title typography.- hover_
card HoverCard— a richerTooltipthat shows arbitrary content on hover.- icon
Icon— a small set of vector icons drawn with the painter.- input
- gpui-component-style single-line
Inputfield. - label
- Theme-aware
Label. A thin wrapper aroundegui::Labelthat knows about the theme’s semantic text colors (muted,secondary,primary, …). - link
Link— a themed hyperlink.- list
ListItem— a clickable, themed row used to build list-style UIs.- menu
Menu— a dropdown / context menu of clickable items.- notification
Notificationtoasts — transient messages stacked in a screen corner.- number_
input NumberInput— a numeric field flanked by−/+stepper buttons.- otp_
input OtpInput— a row of single-character boxes for one-time codes.- pagination
Pagination— page navigation with prev/next arrows and numbered buttons (collapsing to ellipses when there are many pages).- popover
Popover— floating content anchored to a trigger widget.- progress
Progress— a horizontal progress bar (determinate or indeterminate).- radio
Radio— a single radio button. Pair several with the same backing value to form a group.- rating
Rating— a row of clickable stars bound to a&mut u32.- resizable
Resizable— two panes separated by a draggable divider.- scroll_
area ScrollArea— a theme-styled wrapper aroundegui::ScrollArea.- select
Select/Combobox— a dropdown that picks one option from a list.- separator
Separatorwidget. Horizontal or vertical thin line that follows the theme’s border color.- sidebar
Sidebar— a vertical navigation panel with icon + label items.- slider
Sliderwidget.- switch
Switchwidget (toggle).- tabs
Tabswidget — a horizontal tab bar driving a&mut usizeselection.- tag
Tagwidget. LikeBadgebut with an optional close (×) button and click semantics.- titlebar
TitleBar— a custom window title bar (for borderless / custom-chrome apps).- tooltip
Tooltip— themed hover help attached to any widgetResponse.- tree
- Tree widget powered by
egui_ltreeview.
Structs§
- Tree
View - A tree view widget.
- Tree
View Builder - The builder used to construct the tree.
- Tree
View Settings - The global settings the tree view will use.
- Tree
View State - Represents the state of the tree view.
Enums§
- Tree
Action - An action the tree view would like to take as a result of some user input like drag and drop.