rlvgl-ui
Package: rlvgl-ui
rlvgl-ui is the higher-level component crate in the rlvgl workspace. It
builds on top of rlvgl-core and rlvgl-widgets to provide themed controls,
layout helpers, style builders, and overlay utilities for application code.
What It Provides
- ready-to-use components such as
Alert,Badge,Bar,Button,ButtonMatrix,Checkbox,Divider,Drawer,Input,Led,List,Modal,Progress,Radio,Select,Spinner,Spacer,Switch,Tabs,Tag,Text, andToast - direct access to mature LVGL-parity widgets such as
Calendar,MessageBox,Spinbox,Table, andWindow - layout helpers including
HStack,VStack,Grid, andBoxLayout - geometry helpers including
rect,origin_rect,RectProps, andTheme::control_rect - a theme/token layer with
Theme,Tokens,Style,StyleBuilder, and fluentStyleProps/ThemeProps - direct-widget part theming through
ThemedPartsPropsforCalendar,MessageBox,Spinbox,Table, andWindow - overlay and transient UI helpers such as
EventWindow - an optional
viewfeature for view-oriented helpers
Naming and Props
The UI crate uses canonical Rust names with Chakra-inspired vocabulary:
- app-facing wrappers use common component names where they clarify intent,
such as
Selectover the lower-level dropdown andProgressover the progress bar - LVGL-specific controls keep their LVGL-oriented names, such as
Bar,ButtonMatrix,Led, andSpinbox - type names use
PascalCase; methods usesnake_case - fluent style props use short names such as
bg,rounded,border_width, andopacity - themed props use
ColorScheme,Variant, andComponentSize; variants includeSolid,Subtle,Outline, andGhost - state builders use
with_*when the natural name is already the getter, such aswith_value,with_options, andwith_active_tab BoxLayoutremains the layout box name to avoid conflicting withalloc::boxed::Box
For components with accent parts, such as Progress, Bar, Spinner,
Led, Select, Tabs, and ButtonMatrix, the inherent themed(...) method
maps the same resolved theme style onto fills, indicators, selected rows, or
tab states. For simpler components, importing ThemeProps provides a generic
themed(...) style-only prop. Direct LVGL-parity widgets use
themed_parts(...) when their header, cursor, selected-cell, or button colors
should also follow the theme.
Rect construction follows the same compact style:
- use
rect(x, y, width, height)for explicit geometry - use
origin_rect(width, height)for origin-based children - import
RectPropsfor fluent adjustments such asat,size,height,translate,inset, andmin_size - use
Theme::control_rect(x, y, width, size)when a component should use the theme's recommended minimum height for aComponentSize
How It Fits
rlvgl-coresupplies the runtime primitives: events, rendering, styles, applications, and plugin hooksrlvgl-widgetssupplies lower-level widget implementationsrlvgl-uicomposes those pieces into a more ergonomic application-facing API
This crate is no_std by default and is intended to work on both embedded
targets and simulator builds.
Features
view: enables the optionalviewmodule
Typical Use
Use rlvgl-ui when you want to build application screens from themed controls
instead of wiring raw widget types and style values by hand. It is a good fit
for demo shells, control panels, settings screens, and overlay-driven UIs where
you want a consistent look across simulator and hardware targets.
License
MIT
More Information
For more information, visit softoboros.com.