Expand description
Basic components for the Tessera UI framework.
§Usage
First, you need to register the pipelines provided by this crate.
use tessera_components::pipelines::register_pipelines;
use tessera_ui::renderer::Renderer;
Renderer::run(
// ...
|app| {
tessera_components::pipelines::register_pipelines(app);
},
);Then you can use the components in your UI.
§Example
use tessera_components::{
button::{ButtonArgs, button},
text::text,
text_editor::{TextEditorArgs, text_editor},
};
use tessera_ui::Dp;
// Button example
button(ButtonArgs::filled(|| { /* Handle click */ }), || {
text("Click me".to_string())
});
// Text editor example
text_editor(TextEditorArgs::default());Re-exports§
pub use ripple_state::RippleState;
Modules§
- alignment
- Defines alignment options for layout components.
- app_bar
- Top app bars for app-level navigation and actions.
- badge
- Material Design badge primitives.
- bottom_
sheet - A component that displays content sliding up from the bottom of the screen.
- boxed
- A container for stacking and aligning multiple children.
- button
- Material-styled button components.
- button_
groups - Material 3-style segmented buttons with single or multiple selection.
- card
- Material Design card primitives.
- checkbox
- A customizable, animated checkbox component.
- chip
- Material Design chip components.
- column
- A vertical layout component.
- date_
picker - Date picker components for selecting calendar dates.
- dialog
- Modal dialog provider — show modal content above the main app UI.
- divider
- Material Design divider primitives.
- floating_
action_ button - Floating action button component.
- flow_
column - A flowing vertical layout component.
- flow_
row - A flowing horizontal layout component.
- fluid_
glass - A component for creating a frosted/distorted glass visual effect.
- glass_
button - An interactive button with a glassmorphic background.
- glass_
progress - A progress bar with a glassmorphic visual style.
- glass_
slider - A slider component with a glassmorphic visual style.
- glass_
switch - A switch (toggle) component with a glassmorphic visual style.
- icon
- A component for rendering raster or vector icons.
- icon_
button - An interactive button that displays an icon.
- image
- A component for rendering raster images.
- image_
vector - Vector image component built on top of SVG parsing and tessellation.
- interaction_
state - Shared interaction state for hover/press/focus tracking.
- lazy_
grid - Virtualized grid components for efficient, scrollable tile layouts.
- lazy_
list - Virtualized list components for displaying long scrolling feeds.
- lazy_
staggered_ grid - Virtualized staggered grid components for masonry layouts.
- material_
icons - Material Design icon content helpers.
- menus
- Material Design 3 menus for contextual action lists.
- modifier
- Modifier extensions for basic components.
- navigation_
bar - Material Design 3 navigation bar for primary app destinations.
- navigation_
rail - Material Design 3 navigation rail with collapsed and expanded layouts.
- pager
- Pager container for swipeable pages.
- pipelines
- Render and compute pipelines backing the basic components.
- pos_
misc - Convenience utilities for testing whether a cursor/point falls inside a component or a rectangle. Functions operate using Px units and simple inclusive comparisons on edges.
- progress
- Material progress indicators.
- radio_
button - Material Design 3 radio button with animated selection feedback.
- ripple_
state - Ripple state — manage ripple animation and interaction state layers.
- row
- A horizontal layout component.
- scrollable
- A container that allows its content to be scrolled.
- shape_
def - Defines the
Shapeenum and its variants, used for describing the geometric form of UI components. - side_
bar - A component that displays a side bar sliding in from the left.
- slider
- An interactive slider component for selecting a value in a range.
- spacer
- An invisible component for creating empty space in a layout.
- surface
- A flexible container component with styling and interaction options.
- switch
- An interactive toggle switch component.
- tabs
- A component for creating a tab-based layout.
- text
- Single-style text rendering.
- text_
editor - A multi-line text editor component.
- theme
- Material theme primitives for color, typography, and shape.
- time_
picker - Time picker components for selecting a clock time.
Structs§
- Ripple
Props - Properties for ripple effect animation