Expand description
Android Material 3 Expressive for FerroUI.
Independent compiled XAML theme derived from FerroUI’s WinUI template contracts. Visual reference: AndroidX Material3 1.5.0-beta02 (2026-10-21). See docs/porting/material-theme.md for component coverage and fidelity limits.
ⓘ
use ferroui_themes_material::{MaterialTheme, MaterialAppBuilderExtension};
// Add .with_material_fonts() to your AppBuilder.
application.styles().add(MaterialTheme::new().as_style());Re-exports§
pub use ripple::MaterialRipple;pub use motion::MaterialMotionScheme;pub use motion::MaterialMotionRole;pub use motion::MaterialSpringSpec;pub use motion::MaterialSpringSample;pub use motion::MaterialSpringState;pub use motion::MaterialSpringEasing;
Modules§
- accents
- converters
- The value converters of the WinUI theme: the converters of microsoft-ui-xaml that the theme
resources name and FerroUI’s control set has no counterpart of (docs/porting/winui-theme.md,
section 5). Markup names them with
xmlns:winuiconverters="using:FerroUI.Themes.Material.Converters". - motion
- Material 3 Expressive motion, connected to FerroUI’s transition and compositor APIs.
- primitives
- The primitives of WinUI that the templates of the theme use and FerroUI’s control set has no
counterpart of (
Microsoft.UI.Xaml.Controls.Primitivesof microsoft-ui-xaml). Markup names them withxmlns:primitives="using:FerroUI.Themes.Material.Primitives". - ripple
- The pointer and keyboard press indication used by Material control templates.
Structs§
- Excluded
Document - A control theme document that is embedded but not part of the theme yet, because it names types that are not ported or is not finished.
- Material
AppBar - Place this bar above its
ScrollSourcein an Auto,* grid. Navigation and Actions are ordinary controls: commands, keyboard focus and automation remain their own. The scroll source is weak. A drag consumes app-bar pre-scroll, then child scroll, then leftover app-bar post-scroll; horizontal gestures remain with the child. - Material
AppBar Fling - Native Android spline decay, including its 100-sample interpolation and millisecond clock.
- Material
AppBar Layout - The app-bar template’s four slots: navigation, compact title, actions, expanded title clip.
- Material
AppBar State - A serializable scroll snapshot. Deltas follow finger movement: up is negative. The offset is always between the negative collapse limit and zero.
- Material
Bottom Sheet Automation Peer - A sheet remains a pane, with native children and explicit expansion actions.
- Material
Bottom Sheet Host - A modal sheet placed as the last child of the application’s overlay
Grid. ItsContentis the sheet body.Stateis the requested semantic state;Self::current_statechanges when the transition settles. - Material
Chip - Attached slots and optional dismissal for the Material chip themes. A selectable chip retains the native ToggleButton pattern with a checkbox role; an assist/suggestion chip retains Button’s invoke pattern.
- Material
Chip Dismiss Button - Template button with a separate invoke/command path; activation never bubbles a chip-body Click and never toggles/removes the body implicitly.
- Material
Chip Layout - Material
Color Scheme - Material
Corner Radius Transition - A physical spring transition with independent velocity for all four corner radii.
- Material
Date Cell - A native Button with a selection-item automation contract. The 48dp hit cell is deliberately larger than its 40dp day surface (72x36dp for a year).
- Material
Date Cell Automation Peer - Material
Date Input Format - Native date input always uses two-digit month/day and four-digit year in the culture’s order. Eight underlying digits are displayed with two delimiters.
- Material
Date Month View - A six-row month. Empty leading and trailing cells are layout space, without selectable dates from adjacent months. Range paint is behind the real buttons.
- Material
Date Months Panel - Physical scroll extent for all months, with only visible months plus one on each side realized. The native 48dp subhead + 288dp calendar yields a 336dp stride.
- Material
Date Picker - Embed directly, or enable
ShowActionsin a dialog/sheet.SelectedDatealiasesSelectedStartDate; end dates are inclusive. SelectionChanged is raised for edits; Confirmed/Dismissed let the application own modal lifetime and committed values. - Material
Date Picker Automation Peer - Material
Date Picker State - A restorable native selection snapshot. End dates are inclusive. An incomplete range has a start and no end; an invalid or reversed programmatic range clears both ends.
- Material
Double Transition - A physical spring transition for scalar properties, including opacity and switch geometry.
- Material
Dynamic Color Options - Inputs for a generated dynamic scheme. Contrast is in [-1, 1]: zero is standard, 0.5 is medium, and 1 is high contrast. NaN/infinite/out-of-range values are rejected.
- Material
Dynamic Palette - All five Android tonal palettes, including the full neutral and neutral-variant ranges. The Android 31–33 mapping deliberately uses neutral-variant surfaces, as AndroidX does, rather than the older system’s lower-chroma neutral palette.
- Material
Extended Fab - A normal Button with an icon, a label in
Content, and an animated expanded state. Commands, keyboard activation, routed Click and the invoke automation pattern are inherited. - Material
Extended FabLayout - Two-child layout used by the extended-FAB template: icon first, label second. It measures the expanded label at full available width while reporting an interpolated width. The container’s rounded trailing edge therefore follows the animation naturally.
- Material
Loading Indicator - A Material loading indicator with native 48dp container and 38dp active size.
Value,Minimum,Maximum, and range accessibility come from RangeBase;Percentageprovides a convenient 0–100 alias independent of that range. - Material
Progress Indicator - Renderer used by the Material ProgressBar control themes. The enclosing ProgressBar owns range semantics and automation; this noninteractive visual consumes its percentage and state without changing that control’s behavior.
- Material
Range Slider - A bounded range selected by two focusable Material slider handles.
- Material
Range Slider Layout - Template panel drawing native track segments and positioning the two 48dp input cells.
- Material
Range Slider Thumb - A real range control used for one endpoint, with its own focus and RangeValue provider.
- Material
Range Slider Thumb Automation Peer - Material
Search View - A 56dp search field with an animated docked results surface.
Contentsupplies the application’s results;Queryis two-way bindable. Query submission is a routed event, so filtering can remain in the view model. The same TextBox survives expansion, preserving composition, undo and selection. - Material
Segmented Content - Two-child layout: an 18 dp check, then the label. Its width always reserves the check and 8 dp gap. An unchecked label is centered by a 13 dp logical offset. Check removal is immediate; check entry has its own scale and opacity springs.
- Material
Segmented Group - A Material segmented row. Use
RadioButtonchildren for single choice (the default), or setIsMultiSelect="True"and useToggleButtonchildren for independent choices. - Material
Segmented Group Automation Peer - Group selection provider while its children retain native radio/toggle peers.
- Material
Selection Mark - Material
Sheet Anchors - Sheet top coordinates in a viewport, expressed in device-independent pixels.
- Material
Snackbar - The lookless visual for a snackbar. The host owns request lifetime; its template owns message wrapping, optional action/dismiss buttons, and single/two-row composition.
- Material
Snackbar Future - Awaitable request. Cancelling a pending future removes its active or queued message.
- Material
Snackbar Handle - Identity-stable access to one queued request. Its operations never address a successor.
- Material
Snackbar Host - A XAML-friendly host for a FIFO queue of Material snackbars. Place it in the bottom row or overlay of the application’s existing layout. At most one request is actionable; outgoing visuals may overlap during their exit fade.
- Material
Snackbar Message - Content/options for a queued snackbar.
duration: Noneselects the native default: short without an action, indefinite with an action. - Material
Text Field - Attached Material text-field decoration. Works on the existing
TextBox; choosing a theme does not replace the editor or its automation peer. - Material
Text Field Border - Material
Text Field Layout - Arranges a real text editor together with Material decoration. In particular, outlined labels interpolate from the editor’s start edge to the 16dp outline inset, independently of leading-icon and prefix widths. Supporting content contributes to the control’s height without stretching the painted container.
- Material
Theme - Includes the Android Material theme in an application.
- Material
Thickness Transition - A physical spring transition with independent velocity for all four thickness components.
- Material
Time Changed Event Args - Material
Time Picker - A persistent, minute-precision time editor with an analog dial and numeric input. Hour is always 0–23, even when the display uses AM/PM. Invalid intermediate text is retained separately; SelectedTime and TimeChanged expose only valid values.
- Material
Time Picker Automation Peer - Material
Time Picker Dial - Template panel displaying the dial and twenty-four individually selectable hour/minute nodes.
- Material
Time Picker Field - TextBox subclass keeps the platform editor, IME, clipboard, selection, and value provider.
- Material
Time Picker Layout - Native measured layout, including compact landscape dial sizing and RTL outer layout.
- Material
Time Picker Number - Each clock value retains RadioButton’s selection-item automation contract.
- Material
Time Picker Number Automation Peer - A clock number exposes selection and the distinct native semantic click. Invoking may advance to minutes; selection and keyboard activation do not.
- Material
Tonal Palette - An imported or HCT-generated tonal palette. Imported ARGB values are preserved exactly. Sparse palettes are supported, but scheme creation fails for missing tones.
Enums§
- Density
Style - Layout density. Both modes preserve Material’s minimum 48dp touch targets.
- Material
Android Color Error - A native import failure. Existing theme colors remain installed when an import fails.
- Material
Android Color Source - Which native Android resource contract supplied a dynamic color scheme.
- Material
AppBar Scroll Behavior - Material
AppBar Size - Material
Chip Kind - Material
Color Role - Material
Color Spec - Source-spec selection for locally generated phone schemes. The default is
exactly Google’s
DynamicScheme.DEFAULT_SPEC_VERSIONat the pinned commit. This never changes imported Android colors or the AndroidX baseline schemes. - Material
Date Picker Mode - Material
Date Selection Mode - Material
Dynamic Color Error - A failed import identifies the exact missing tone or role; it never substitutes an unrelated color or interpolates missing platform tones in RGB.
- Material
Extended FabSize - The three expressive extended-FAB sizes in the pinned component implementation.
- Material
Palette Family - Material
Palette Style - Material Color Utilities palette variants. This is independent of the UI motion scheme.
- Material
Range Thumb - Material
Sheet State - The semantic state of a Material bottom sheet.
- Material
Snackbar Duration - Native Material display durations. These describe readable lifetime, not animation duration.
- Material
Snackbar Result - The terminal outcome of one request. Cancellation is distinct from user dismissal.
- Material
Status Color - The status colors the theme adds to the Material roles, which have no success or warning colors: tonal green and amber, for the severities of InfoBar and InfoBadge.
- Material
Text Field Slot - A slot of
MaterialTextFieldLayout. Each slot has at most one direct child. - Material
Time Display Mode - Material
Time Selection
Constants§
- MATERIAL_
COLOR_ UTILITIES_ VERSION - Exact upstream source used for palette, tone-delta, and role-contrast rules.
- MATERIAL_
HCT_ SOLVER_ VERSION - The separately pinned implementation of the CAM16/HCT gamut solver.
Statics§
- ASSEMBLY
- What this crate states about itself for markup: its assembly name and the namespace the XML namespace of the framework maps to.
Traits§
- Material
AppBuilder Extension - Adds the embedded Android font family to FerroUI’s cross-platform font manager.
- Material
Snackbar Timeout Policy - Adapter for a host’s recommended accessibility timeout. Text and icons are always present;
contains_controlsmeans an action label is present, matching the reference host. ReturnNoneto require explicit dismissal. Recommendations cannot shorten the base duration.
Functions§
- circular_
indeterminate_ frame - Rotation in degrees and sweep fraction for the 6-second circular cycle. Android’s keyframes add four 90-degree turns with a 300ms advancing phase and a 1200ms hold; the global rotation runs continuously over six seconds.
- excluded_
documents - The control theme documents
Controls/MaterialControls.xamldoes not merge yet, fromControls/excluded.txt. - linear_
indeterminate_ segments - Start/end fractions of Android’s two indeterminate line segments. The 1750ms cycle, head/tail durations and delays are ported from ProgressIndicator.kt.
- loading_
indeterminate_ frame - Shape index, spring progress, and clockwise rotation in radians. New morphs start every 650ms; continuous global rotation takes 4666ms per revolution. Compose computes a 297ms settling duration for this spring at visibility threshold 0.1, then snaps to its target and holds until the next interval.
- register_
types - Registers the namespaces, the types, the assembly, the embedded documents and the document loader of this crate (and of the crates it is built on). Cheap and idempotent.