Skip to main content

Crate gpui_m3

Crate gpui_m3 

Source
Expand description

Material 3 Expressive components for GPUI.

ⓘ
Application::new().with_assets(gpui_m3::Assets).run(|cx| {
    gpui_m3::init(cx);
    // ...
});

Re-exports§

pub use motion::MotionSettings;
pub use motion::Spring;
pub use shapes::Morph;
pub use shapes::ShapeName;
pub use shapes::Tone;
pub use syntax::SyntaxHighlighter;
pub use syntax::SyntaxLines;
pub use syntax::SyntaxPalette;
pub use syntax::TokenKind;
pub use theme::Elevation;
pub use theme::Scheme;
pub use theme::SchemeVariant;
pub use theme::Theme;
pub use theme::corner;
pub use components::*;

Modules§

components
interaction
M3 interaction states: hover layer and a ripple that starts where you press.
motion
M3 Expressive motion: physics-based springs (not fixed-duration curves).
shapes
M3 Expressive shape library (cookie, clover, sunny, burst, pentagon…) and morphing.
syntax
Syntax highlighting for code blocks and viewers, line by line.
theme
Material 3 Expressive color, typography and corner scale.

Structs§

Assets
The library’s asset source. To combine it with your app’s, delegate m3/… paths to it or use Assets::load_icon.

Constants§

ICON_PREFIX
Asset path prefix of the library icons.

Functions§

init
Registers the typeface, the base (light) theme and the motion settings.