Skip to main content

Crate gpui_material

Crate gpui_material 

Source
Expand description

Material 3 Expressive controls and theme for GPUI applications.

Initialize MaterialRoot and call init_components before opening windows. Compose controls with GPUI elements and keep controlled selection and command outcomes in the application. Sliders use a retained SliderState entity.

Re-exports§

pub use gpui_material_foundation as foundation;
pub use gpui_material_theme as theme;

Modules§

date_time
Optional Material date and time editors. Confirm callbacks request committed values from the application. Picker states retain the draft and focus.
window_chrome
Cross-platform client-drawn window title bars and controls backed by GPUI.

Structs§

AdaptiveNavigation
Material 3 navigation suite for the existing Scaffold bar and rail slots.
AdaptiveNavigationInfo
Available scaffold space for an application-supplied navigation policy.
AdaptiveNavigationState
Retained navigation visibility, independent of the current presentation.
AdaptivePane
A pane slot with stable identity, logical geometry preferences and adaptation.
AdaptivePaneLayout
A three-role scaffold with caller-supplied panes, an explicit available viewport, and retained layout, expansion and navigation state.
AdaptivePaneState
Retained presentation, expansion and navigation state for a single adaptive layout.
AppBar
Top app bar with caller-owned navigation, headings, actions, and optional search.
AppBarColors
Per-instance pigments. Missing fields use the window theme.
AppBarColumn
Vertical actions with responsive overflow.
AppBarItem
One action with an inline representation and an overflow menu representation.
AppBarMenuState
Handle to the active strip’s overflow menu, available to its item and trigger builders.
AppBarPadding
Logical insets within each app bar row.
AppBarRow
Horizontal actions with responsive overflow.
AppBarScrollState
Retained app bar presentation state. Use a distinct entity per app bar.
Avatar
A circular or rounded Material avatar displaying initials, an icon, an image, or custom content.
AvatarColors
Optional per-instance pigments for an Avatar. Omitted fields use the configured color roles.
AvatarGroup
An overlapping horizontal stack of Avatar items with surface-matched cutout rings and an optional +N overflow indicator.
Badge
A standalone or anchored Material badge. For anchored badges, include the badge’s information in the host’s accessible name.
Banner
An in-flow, non-blocking Material 3 banner/callout surface.
BannerColors
Optional per-region colors for Banner.
BottomAppBar
Material 3 Bottom App Bar (80 dp default height, SurfaceContainer, Elevation::Level2). Mounts seamlessly in crate::Scaffold::bottom_bar or standalone layouts.
BottomAppBarColors
Optional pigment overrides for BottomAppBar. Omitted fields use the window theme.
BottomAppBarPadding
Logical insets inside a BottomAppBar. Defaults follow Material 3 (4 dp leading icon inset, 16 dp trailing FAB inset, 12 dp vertical).
BottomSheetState
Retained position, available stops and transitions of a bottom sheet.
BottomSheetThresholds
Thresholds for settling a released sheet drag.
BreadcrumbItem
One path segment inside Breadcrumbs.
Breadcrumbs
Desktop path navigation with RTL mirroring and automatic middle-segment overflow collapse into an anchored Material Menu.
BreadcrumbsColors
Optional color overrides for Breadcrumbs.
Button
A labeled Material action. Activation uses Base’s pointer, keyboard and accessibility behavior and invokes the application callback once.
ButtonBorder
A stroke for any button variant. A zero width removes its outline.
ButtonColors
Per-instance pigments. Each omitted field keeps the variant’s color in that state. Checked colors apply to enabled toggles.
ButtonElevations
Optional Material elevation levels. Disabled takes precedence, followed by pressed, keyboard focus, hover and rest.
ButtonGroup
An expressive row with controlled selection and a Material menu for items that do not fit. Arrow keys move focus without changing selection.
ButtonGroupConnectedShapes
Overrides connected shapes by a segment’s logical position in the visible row.
ButtonGroupItem
One entry with a stable, caller-provided identifier.
ButtonGroupItemStyle
Per-member appearance overrides. Omitted fields keep group or Material defaults.
ButtonPadding
Insets around the label or custom content, including leading and trailing icons.
ButtonShapes
Button corner overrides in logical top-start, top-end, bottom-end, bottom-start order. Unspecified states keep their size and shape presets.
Card
A static surface or a keyboard-operable action with independent child controls.
CardBorder
The card’s stroke. A zero-width border removes the stroke.
CardColors
Per-instance colors. Omitted fields keep their variant and window defaults.
CardElevations
Shadow levels. Each omitted field keeps the variant default for its state.
Carousel
A viewport-sized collection of Material carousel items.
CarouselBorder
A stroke drawn inside the parallax mask in logical pixels.
CarouselFlingContext
Positions before and after a precise scroll gesture, in fractional item units.
CarouselItem
One slide, with a stable unique identifier and a localized accessible name.
CarouselPadding
Padding in logical pixels. Start and end follow the window direction.
CarouselParallax
Clips and translates arbitrary scrollable content at the viewport edges.
CarouselState
Retained scroll position for one carousel. Observe the entity to read changes from input, programmatic navigation, or item replacement.
Checkbox
Controlled Material checkbox. Mixed activation requests Checked.
CheckboxColors
Per-instance checkbox colors. Disabled entries take precedence over error entries.
CheckboxStateColors
Optional pigments for one checkbox state. Unset fields use the window theme.
CheckboxTile
Settings convenience row wrapping ListItem with a synchronized decorative Checkbox.
Chip
A Material chip. Filter and Input chips request controlled selection changes. Filter and Input chips can expose a separate removal action with its own focus.
ChipColors
Enabled, selected, and disabled chip pigments. Disabled-selected fields fall back to disabled overrides. Selection applies to Filter and Input chips.
ChipElevations
Optional shadows for each state. Disabled and dragged take precedence over press, keyboard focus, hover, and rest.
ChipGroup
A controlled collection of Material chips with M3 8 dp spacing, roving keyboard focus, RTL mirroring, and Role::ListBox semantics.
ChipGroupItem
One chip entry in a ChipGroup with a stable caller-owned identifier.
ChipStateColors
Per-slot pigments for one chip state. Omitted fields retain the defaults.
ChoiceOption
One selectable option in a ChoiceTile anchored menu.
ChoiceTile
Settings convenience row combining ListItem with an anchored Material Menu of ChoiceOptions.
CircularProgress
Circular progress. Supply a fraction from 0 to 1, or omit it for indeterminate progress.
Dialog
A named Material modal with optional structured slots or caller-defined content.
DialogAction
Activation for a dialog slot, valid while that open dialog owns input.
DialogColors
Local overrides for a dialog surface and its content slots.
DialogProperties
User dismissal routes for a Material dialog.
DialogState
Retains a dialog’s visibility and focus scope across renders.
DisplayScrollbar
A read-only scroll position indicator. Mount it after the scroll viewport as a child of the same relative parent and give it a stable ID.
DisplayScrollbarFade
Shows the indicator after a scroll offset change, then fades it out.
DisplayScrollbarStyle
Display scrollbar colors and dimensions. Lengths are in logical pixels.
Divider
Decorative Material divider, with logical start and end insets.
DragHandleColors
Fill colors. Omitted values use the corresponding window theme role.
DragHandleShapes
Corner shapes in logical corner order. Omitted values use Material defaults.
DragHandleSizes
Visual sizes in logical pixels. Omitted values use Material defaults.
DropTarget
Material-styled drag-and-drop container supporting external OS files (ExternalPaths) and typed in-app GPUI drag payloads T: 'static.
DropTargetColors
Per-instance pigments for idle, valid drag-over, and rejected drag-over states of a DropTarget.
DropdownOption
A selectable dropdown value. IDs remain stable when options are reordered.
EmptyState
A purely presentational Material 3 Expressive empty-state layout shell.
ExposedDropdown
A Material field and anchored list in editable and selection-only modes. Typing filters the list, while only selecting an option calls the owner.
ExposedDropdownState
Keeps the editable query and pending keyboard choice across renders.
ExtendedFab
An elevated action with a label or custom content and an optional icon. All presentations share one action, accessible name, and focus handle.
Fab
An elevated icon action with a required accessibility name. Mount it beside the scroll viewport to keep its position fixed while content scrolls.
FabMenu
A floating action button that opens a stack of commands above it. Provide two to six actions with stable IDs.
FabMenuItem
An individually labeled FAB menu action. Supply a stable id for each item.
FabMenuItemColors
Optional colors for an individual FAB menu action.
FabMenuTriggerAppearance
Optional appearance of one endpoint of the FAB menu trigger transition.
FabMenuTriggerStyle
Interpolated collapsed and expanded trigger appearances.
FabVisibilityAnimation
Appearance and disappearance motion for a controlled FAB.
Feed
An ordered, vertically scrolling feed. Supply the same scroll handle when the number of columns changes. Cards are placed in reading order.
FloatingAction
Places a FAB inside the current window viewport at logical bottom-end. Mount this element beside the scroll owner so it stays visible while scrolling.
Icon
A decorative icon by default; .label exposes an independently meaningful image. Named symbols and raw SVG data inherit text size and foreground, including disabled colors, from their control’s icon slot. Outside a slot, use .size(px(24.)) for a 24dp icon. Custom SVG paths use the application’s AssetSource. Mirroring is opt-in.
IconButton
An icon-only action with a required accessibility name.
IconToggleButton
An icon-only controlled toggle. The selected icon and native toggle state both reflect the caller’s value.
InteractionSource
Observes the presentation state of controls with a shared GPUI entity.
InteractionState
A snapshot of interaction state from the caller’s GPUI/Base behavior.
InteractionUpdate
One deferred change from an observed control.
Label
An overlay annotation for arbitrary anchor content and its own interaction source.
LinearProgress
Horizontal progress. Supply a fraction from 0 to 1, or omit it for indeterminate progress.
List
A list of identified rows. Applications can supply a visible window of rows from their own virtualized collection.
ListDetail
Shows a list or detail at compact and medium widths, and both at expanded widths. The owner retains pane entities and scroll handles, selects the narrow pane and supplies the back command.
ListItem
A Standard or Segmented list row. Values and data changes belong to the caller.
ListItemColors
Per-row palette. Omitted colors use the current window’s theme.
ListItemElevations
Per-state shadow levels. Rows default to Level0, or Level4 while dragged.
ListItemPadding
Logical padding in pixels. Using the builder replaces the adaptive defaults.
ListItemShapes
Logical shapes for one row. An omitted shape uses the resting or selected shape, including the list’s grouped corners.
ListItemStateColors
Independent colors inherited by the container and each slot in one state.
ListSection
Titled list section supporting ListVariant::Standard and Material 3 Expressive ListVariant::Segmented grouped corner geometry and unified vertical roving focus across ListItem and settings tiles.
LoadingIndicator
Progress for an operation. Pass a value to select determinate mode, or omit the value for an indeterminate animation.
LoadingIndicatorShape
An endpoint shape for a loading indicator morph.
LoadingIndicatorShapes
A prepared sequence of rounded polygons for a loading indicator.
MaterialRoot
Initializes Material and Base before the application opens its first window.
MaterialTheme
Application-owned configuration consumed by the Material rendering layer.
Menu
Positions a Material menu against a caller-owned, keyboard-focusable trigger. Pointer and keyboard activation use the same Base popover focus lifecycle.
MenuItem
An item in a Material menu. Callers retain command and selection state.
MenuItemStyle
Per-row overrides. Unset shapes and colors follow the menu palette and layout.
MenuSurfaceStyle
Per-surface menu styling. Omitted values use defaults appropriate to the surface.
NavigationBar
Material Expressive short navigation bar.
NavigationBarColors
Short navigation bar pigments. Item overrides take precedence over content.
NavigationDrawer
Full-width Material 3 Navigation Drawer (360 dp default width) with Standard (docked) and Modal (side-sheet) presentations, sections, dividers, and 56 dp pill destination indicators.
NavigationDrawerColors
Per-instance pigment overrides for NavigationDrawer. Omitted fields use the window theme.
NavigationDrawerSection
Convenience section grouping an optional heading with a list of NavigationItems.
NavigationItem
One destination or tab with an ID unique within its collection.
NavigationItemColors
Optional pigments for an Expressive navigation destination.
NavigationItems
Controlled destinations. Use the same collection ID across adaptive presentations to preserve focus on the destination that currently owns it.
NavigationRail
Material wide navigation rail. The optional modal uses the side-sheet session.
NavigationRailColors
Independent local colors and scrim opacity.
NavigationRailPadding
Logical insets in pixels, also used inside a destination’s indicator.
NavigationRailShapes
Per-mode shape overrides. Omitted values use the default docked or sheet shape.
NavigationRailState
Retained presentation of a docked rail. Modal visibility uses DialogState.
PaneDestination
A history entry with an optional stable domain content key.
PaneLayoutDirective
Available partitions and preferred pane sizes in logical pixels.
PaneLayoutValue
Presentation of the three roles, independent of their navigation content keys.
PaneMargins
Pane margins in logical pixels.
PaneSeparator
An opt-in resize handle between two adjacent logical roles.
PolygonMorph
A reusable morph between two pinned Material polygon roles.
ProgressStop
Geometry and appearance passed to a linear determinate stop painter.
ProgressStroke
Per-stroke appearance. The default width is 4 dp and the color comes from the window palette’s active or track role.
PullToRefresh
A vertical viewport with an Expressive refresh indicator and accessible action.
PullToRefreshProgress
Readback supplied to a caller’s indicator.
PullToRefreshState
Retained gesture and indicator state. The application owns refreshing.
Radio
A radio option. A group owns the tab stop and the caller owns selection.
RadioColors
Radio indicator pigments. Omitted values use the current window theme.
RadioGroup
A controlled single-selection group with one Tab stop and directional navigation.
RadioTile
Settings convenience row wrapping ListItem with a synchronized decorative Radio.
RailModalOptions
Window-local side-sheet policy for the optional modal rail.
Scaffold
Arranges the top app bar, leading rail, content and bottom bar. The floating action and snackbar are anchored within the content region above bottom navigation. Give the scaffold a bounded size and give its content a scroll viewport if needed.
ScaffoldContentLayout
Resolved body layout before the content builder applies its padding.
ScaffoldInsets
Logical edges in pixels. Start and end follow the window direction.
Scrim
A backdrop that fills its positioned parent. Add it after background content and before the foreground surface. The caller owns visibility and modal focus.
SearchBar
A Material search entry that can occupy the existing AppBar search slot.
SearchMotion
Show and dismissal durations. The default settles immediately.
SearchPopupOptions
Behavior for a docked popup anchored to the search trigger.
SearchRequest
Identifies one committed query. Complete requests through SearchState::complete.
SearchResult
A result row whose ID remains stable when results reorder.
SearchScrim
Optional screen dimming with a window theme fallback.
SearchScrollState
Retained Enter Always behavior for a standalone search bar.
SearchState
Retains editing, IME, result and focus state while the search view expands. The application performs asynchronous work and owns resulting navigation.
SearchStyle
Independent appearance overrides. Omitted values use the current window theme.
SearchView
Expanded Material search editor and result region, also usable as an independent view.
SearchWindowOptions
Properties of the full-window search overlay. Insets use left and right as logical start and end.
Shape
A prepared shape with a shared mesh for drawing, clipping, hit testing, and effects.
ShapeMorph
A reusable morph between any two ShapePolygon contours.
ShapeMorphSequence
A reusable multi-step sequence of ShapeMorph transitions.
ShapePolygon
A reusable normalized polygon contour backed by polymorpher.
Sheet
A docked or modal Material sheet. Standard sheets take part in parent layout. The caller owns the bottom sheet’s expanded value and handles changes.
SheetClose
Activation for a close control supplied by the caller.
SheetColors
Optional local colors for the sheet and its adornments.
SheetMargins
Logical detached margins in pixels. The default is 16 px on each side.
Skeleton
An animated Material 3 loading placeholder built on LoopClock and is_bounds_visible.
SkeletonColors
Optional base and highlight pigments for Skeleton.
Slider
An Expressive slider. Base owns the value and step grid. The caller retains the state entity and observes its SliderEvent notifications.
SliderColors
Optional slider colors. Unspecified fields use the window theme.
SliderMarker
The window position and default paint of a track tick or stop.
SliderState
State of the Slider.
SliderThumbStyle
Optional dimensions and colors for one handle.
SliderTile
Settings convenience row combining a ListItem header, live formatted value display, and an embedded Slider bound to a caller-owned SliderState.
SliderTrackStyle
Optional track dimensions in logical pixels.
Snackbar
A message for a window’s snackbar queue. The default timeout is four seconds.
SnackbarColors
Optional per-region colors. Omitted fields use the window’s inverse palette.
SnackbarHost
One FIFO message queue per host. Mount the entity in the window layout. A new message leaves keyboard focus wherever it is.
SnackbarId
An entry in one snackbar host’s queue.
SnackbarParts
Host-owned status and activation elements for a custom layout.
SplitButton
Two adjoining actions with independent focus, content, and appearance.
SplitButtonSegmentStyle
Optional per-segment appearance. Omitted values keep the selected size and variant’s defaults.
StepItem
One step entry in a Stepper.
Stepper
Horizontal or vertical Material 3 multi-step indicator and navigator.
StepperColors
Per-instance pigment overrides for Stepper. Omitted fields use the window theme.
SupportingPane
A main workspace with an optional trailing support pane. In single-pane mode the caller can show the supporting pane as a full-width view.
Surface
A passive Material background or an interactive surface with arbitrary children.
SurfaceBorder
An outline in logical pixels, drawn around the surface’s shape.
SurfaceFeedback
Customizes the Material feedback painted by one interactive surface.
SwipeToDismiss
A foreground and background with logical horizontal swipe gestures. The caller owns the content, action commands, and resulting data changes.
SwipeToDismissState
Retained swipe state. Give each mounted swipe container its own entity.
Switch
Material switch. The caller owns the checked state and optional thumb content.
SwitchColors
Per-instance colors for enabled and disabled switches in either checked state.
SwitchStateColors
Optional pigments for one switch state. Omitted fields use the window theme.
SwitchTile
Settings convenience row wrapping ListItem with a synchronized decorative Switch.
TabIndicatorLayout
Geometry and tint supplied to a decorative custom indicator.
TabIndicatorStyle
Overrides for the indicator that tracks the selected tab.
Tabs
A fixed Material tab row by default. Enable scrolling for long tab lists.
TabsColors
Optional tab row pigments. Per-tab overrides take precedence over content.
Text
Single-line Material text. Measurement and painting share Foundation’s shaped glyphs, including font fallback and letter spacing.
TextField
A Material presentation for a caller-owned Base text editing entity.
TextFieldColorOverrides
Optional colors for a single text field state. An unset role uses the window theme.
TextFieldColors
Per-instance colors. Disabled takes precedence over invalid, then focused.
TextFieldLayout
Geometry reported after the retained Base editor lays out the field.
ThemeScope
Applies a Material theme, direction, or density to a child and its Material overlays. The element participates in layout using its child’s layout directly.
ToggleButton
A controlled labeled toggle. The caller re-renders with the selected value after accepting a requested change.
Toolbar
A floating or docked group of labeled actions with optional adjacent FAB. Supply a bounded main-axis extent for scrollable overflow. The toolbar reveals the focused action even when its scroll container is narrower.
ToolbarAction
One labeled command or toggle rendered inside a Toolbar.
ToolbarColors
Optional toolbar pigments. The adjacent FAB uses its own palette.
ToolbarElevations
Elevations of an expanded and collapsed toolbar strip.
ToolbarFling
Projects release velocity before choosing a toolbar endpoint.
ToolbarPadding
Logical insets in a toolbar’s content area.
ToolbarScrollBehavior
Controls the toolbar’s expansion thresholds and optional slide away from its resting edge.
ToolbarScrollState
Retained toolbar scroll state. Use one entity per toolbar.
Tooltip
A transient plain or rich Material tooltip, or a persistent rich tooltip with caller-owned visibility.
TooltipCaret
Tooltip caret geometry. The default triangle is 16 px wide and 8 px deep.
TooltipColors
Window-theme color overrides for a tooltip’s individual slots.
TooltipPositioner
An unstyled element that positions its children as an anchored popup.
TooltipState
Visibility retained by the owner of a persistent rich tooltip.
VerticalDragHandle
A vertical Material handle for a horizontally adjustable boundary. The owner provides the layout and decides which requested widths to apply.

Enums§

AdaptiveNavigationType
Current Material 3 Expressive navigation presentations.
AdaptiveNavigationVisibility
Settled visibility of the adaptive navigation slot.
AppBarAlignment
Logical alignment for a title or subtitle.
AppBarScrollBehavior
How changes in the linked content offset affect the app bar’s height.
AppBarVariant
Layout and typography variant for a Material top AppBar.
AvatarShape
Outer clipping shape for an Avatar.
AvatarSize
Material avatar diameter presets and custom logical-pixel sizing.
BottomSheetValue
Settled values for a retained bottom sheet.
ButtonGroupAlignment
Logical horizontal arrangement of visible members and the overflow trigger.
ButtonGroupSelection
Selection is controlled by the caller. Required selection preserves the last active choice once the caller has supplied or accepted a choice.
ButtonGroupVariant
Visual layout style for a ButtonGroup.
ButtonGroupVerticalAlignment
Vertical cross-axis alignment for members inside a ButtonGroup row.
ButtonShape
Resting corner shape preset for Material buttons.
ButtonVariant
Visual emphasis style for Button.
CardVariant
Visual container style for Card.
CarouselAlignment
Resting alignment for Multi-browse, Hero, and Centered Hero keylines.
CarouselFling
Chooses the resting position when a precise scroll gesture ends.
CarouselVariant
Material carousel layouts. Full-screen pages scroll vertically.
CheckboxState
The semantic value exposed by an unstyled Checkbox.
ChipGroupSelection
Controlled selection policy for ChipGroup.
ChipVariant
Material 3 chip category controlling selection, avatar, and trailing-action behavior.
ControlSize
Material Expressive sizes, from extra small to extra large.
DialogCloseReason
An accepted transition from an open to a closed Material dialog.
DialogVariant
Window-relative presentation for a Material dialog.
DropdownAnchor
Focus and activation behavior for the primary dropdown anchor.
FabAlignment
Logical pivot for the FAB’s visibility transition.
FabColor
Material color mapping for Fab and ExtendedFab.
FabMenuAlignment
Horizontal alignment of a FAB menu relative to its trigger.
FabSize
Expressive FAB sizes. Small is the 56 dp FAB and Small Extended FAB.
IconButtonVariant
Visual emphasis style for IconButton and IconToggleButton.
IconButtonWidth
Horizontal width preset for Expressive icon buttons.
IconName
Bundled official Material Symbols Outlined, weight 400, grade 0, optical size 24. Both fill variants are embedded unchanged, without an application AssetSource.
ListDetailPane
Which pane is visible in a single-pane ListDetail layout.
ListItemAlignment
Alignment of the slots within one row.
ListSectionItem
Any list row or settings tile that can participate in a ListSection.
ListVariant
Layout and corner-grouping style for List.
MaterialShape
Named Material 3 Expressive shapes matching pinned Compose MaterialShapes.
MenuColor
Semantic color presets for Material vertical menus.
NavigationBarArrangement
Distribution of the navigation items along the width of the bar.
NavigationBarLayout
Icon-and-label orientation for items inside a NavigationBar.
NavigationDrawerEntry
Ordered entry inside a NavigationDrawer destination list.
NavigationDrawerMode
Presentation mode for a standalone NavigationDrawer.
NavigationItemIconPosition
Placement of a navigation item’s icon relative to its label.
NavigationRailArrangement
Distribution of standard destinations along the vertical axis.
PaneAdaptStrategy
The strategy used when resolving a pane from navigation and the directive.
PaneBackBehavior
How many destinations a back operation can skip.
PaneExpansionAnchor
Anchors relative to the logical extent of one horizontal band excluding its gutters.
PaneOverlayAlignment
Logical alignment of a levitated pane in its horizontal band and available height.
PanePlacement
A pane’s realized presentation.
PaneRole
Roles in a Material three-pane scaffold.
ProgressCap
Shape at the ends of a progress stroke.
ProgressShape
Straight or Expressive wavy active progress indicator.
RailMode
Presentation mode of a docked NavigationRail.
RangeThumb
Identifies the Base slider value represented by a semantic node.
ScaffoldFabPosition
Positions a scaffold’s floating action within the usable content width.
SearchEvent
Search providers subscribe to requests. Submissions and result selection are separate commands and the application owns their consequences.
SearchOutcome
Result from the application’s search provider.
SearchValue
Expansion endpoint of a SearchState presentation.
SearchViewVariant
Presentation layout for an expanded SearchView.
SemanticTone
Semantic palette shortcut shared across Material components.
ShapeFit
How a normalized polygon contour maps into layout bounds.
SheetEdge
Edge of the window or layout container to which a Sheet attaches.
SheetMode
Interaction mode of a Sheet.
SheetPlacement
Placement of a side sheet relative to its window edge or layout slot.
SliderEvent
Events emitted by the SliderState.
SliderKind
Origin of the active track fill for a single-value Slider.
SliderScale
The scale mode of the slider.
SliderValue
The value of the slider, can be a single value or a range of values.
SnackbarResult
How a current snackbar left its host’s queue.
StepStatus
Visual and semantic status of one step in a Stepper.
StepperOrientation
Layout axis for a Stepper.
SwipeToDismissValue
The resting anchor or a logical dismissal direction.
TabIndicatorWidth
Width of the indicator relative to the selected tab.
TabVariant
Visual hierarchy variant for Material Tabs.
TextFieldEvent
An event emitted by an input.
TextFieldLabelAlignment
Horizontal label alignment. Start and End follow the Material theme direction.
TextFieldLabelPosition
Position of the visual label. Filled uses Inside and Outlined uses Cutout by default.
TextFieldMaskPattern
TextFieldObfuscationMode
Visibility mode for TextField::secure editors.
TextFieldVariant
Material text field container treatment. The default is Filled.
ToggleButtonVariant
Visual emphasis style for ToggleButton.
ToolbarArrangement
How a horizontal docked toolbar distributes unused width.
ToolbarColor
Material 3 color treatment preset for a Toolbar.
ToolbarExitDirection
Logical edge toward which the toolbar exits. Start and End mirror in RTL.
ToolbarFabPosition
Places the FAB in logical order. Horizontal positions mirror in RTL.
ToolbarOrientation
Primary layout axis of a Toolbar.
ToolbarPlacement
Surface layout mode for a Toolbar.
TooltipPlacement
Preferred tooltip side. Start and End resolve against the window’s direction.

Traits§

MaterialElementExt
Fluent postfix composition helpers for attaching Material badges, tooltips, and context menus to any GPUI element.
ScrollbarHandle
A trait for scroll handles that can get and set offset.

Functions§

current_base_theme
Projects the active local Material scope (or window/application theme) into a gpui_base::Theme without mutating gpui_base::Theme::global.
current_material_theme
Resolves the closest Material scope, then the window and application defaults.
init_components
Installs component keybindings after initializing the Material root.
material_theme
Returns the shared Material theme installed by MaterialRoot::init.
project_base_theme
Projects a MaterialTheme into a matching gpui_base::Theme without mutating the application-global Base theme.
set_material_theme
Updates the application theme and projects its current values into Base. Colors follow the new theme’s Slow Effects motion spec from the displayed palette. Typography and layout apply immediately.

Type Aliases§

ButtonTone
Semantic palette shortcut for Material buttons and icon buttons. Backwards-compatible alias for crate::SemanticTone. Per-instance ButtonColors and ButtonBorder overrides still take precedence.
TextAreaState
State for editing ordinary multi-line text.
TextFieldState
State for a single-line text input.