Expand description
Basic components for the Tessera UI framework.
Built-in labels follow the language registered with the application entry.
§Usage
First, add the package (recommended) or render module provided by this crate at application entry.
use tessera_components::theme::{MaterialTheme, material_theme};
#[tessera_ui::tessera]
fn app() {
material_theme()
.theme(|| MaterialTheme::default())
.child(|| {
// Your app code here
});
}
use tessera_ui::EntryPoint;
#[tessera_ui::entry]
pub fn run() -> EntryPoint {
EntryPoint::new(app).package(tessera_components::ComponentsPackage)
}
fn main() {
let _ = run().run_desktop();
}Then you can use the components in your UI.
§Example
use tessera_components::{button::button, text::text, text_input::text_input};
// Button example
button().filled().on_click(|| {}).child(|| {
text("Click me");
});
// Text editor example
text_input();Re-exports§
pub use ripple_state::RippleState;
Modules§
- alignment
- Alignment types shared by foundational layout APIs.
- 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 button groups for related actions.
- card
- Material Design card primitives.
- carousel
- Adaptive carousels with smoothly masked, full-size content.
- checkbox
- A customizable, animated checkbox component.
- chip
- Material Design chip components.
- column
- A vertical layout component.
- date_
picker - Date picker components for selecting dates and inclusive ranges.
- dialog
- Modal dialog provider — show modal content above the main app UI.
- divider
- Material Design divider primitives.
- extended_
floating_ action_ button - Extended floating action buttons with animated labels.
- floating_
action_ button - Floating action button component.
- floating_
action_ button_ menu - Floating action menus with staggered action expansion.
- flow_
column - A flowing vertical layout component.
- flow_
row - A flowing horizontal layout component.
- fluid_
glass - A component for creating a frosted liquid lens glass visual effect.
- fluid_
switch - Fluid glass switch - toggle state with a surface track and glass lens.
- fonts
- Fonts loaded on demand when text uses their family or Unicode ranges.
- 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
- Icon component for rendering vector or raster imagery.
- icon_
button - Icon actions with Expressive sizes, widths, and selection states.
- image
- Raster image component and decoding utilities.
- image_
vector - Scalable vector images.
- 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.
- list_
item - Material Design list item component.
- loading_
indicator - Expressive loading indicators with morphing shapes.
- material_
icons - Material Design icon assets.
- 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_
drawer - Navigation drawer surfaces and selectable destinations.
- navigation_
rail - Material Design 3 navigation rail with collapsed and expanded layouts.
- pager
- Pager container for swipeable pages.
- painter
- Unified painter content for vector and raster imagery.
- 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.
- pull_
refresh - Pull-to-refresh container and indicator for scrollable content.
- radio_
button - Material Design 3 radio button with animated selection feedback.
- res
- Generated asset bindings for tessera-components.
- ripple_
state - Ripple state — manage ripple animation and interaction state layers.
- row
- A horizontal layout component.
- scaffold
- Scaffold layout for persistent bars and app content.
- scrollable
- Scrollable viewports driven by a
ScrollableController. - search
- Search bar component - capture queries with optional suggestion content.
- segmented_
buttons - Material Design segmented buttons for compact selections.
- shadow
- Shadow layer definitions for Material surfaces.
- shape_
def - Shape definitions shared by foundational visual APIs.
- side_
sheet - Side sheet provider - slide supporting content in from the screen edge.
- slider
- An interactive slider component for selecting a value in a range.
- snackbar
- Material Design snackbars for transient feedback messages.
- spacer
- An invisible component for creating empty space in a layout.
- split_
buttons - Material Design split buttons for primary and secondary actions.
- 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_
field - Material text fields for filled, outlined, and secure input.
- text_
input - Editable text input with Material outlined styling.
- text_
table - Text tables with content-sized columns and merged cells.
- theme
- Material theme primitives for color, typography, and shape.
- time_
picker - Time picker components for selecting a clock time.
- toolbar
- Floating toolbars for frequently used page actions.
- tooltip
- Anchored plain and rich contextual tooltips.
- wavy_
progress - Expressive progress indicators with moving waves.
Structs§
- Components
Package - Package that registers the components module and required platform services.
- Ripple
Props - Properties for ripple effect animation