Crate tessera_components

Crate tessera_components 

Source
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 Shape enum 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§

RippleProps
Properties for ripple effect animation