tessera_components/
lib.rs

1//! Basic components for the Tessera UI framework.
2//!
3//! # Usage
4//!
5//! First, you need to register the pipelines provided by this crate.
6//!
7//! ```no_run
8//! # use tessera_ui::tessera;
9//! # #[tessera]
10//! # fn component() {
11//! use tessera_components::pipelines::register_pipelines;
12//! use tessera_ui::renderer::Renderer;
13//!
14//! Renderer::run(
15//!     // ...
16//!     # || {}, // Placeholder for root component
17//!     |app| {
18//!         tessera_components::pipelines::register_pipelines(app);
19//!     },
20//! );
21//! # }
22//! # component();
23//! ```
24//!
25//! Then you can use the components in your UI.
26//!
27//! # Example
28//!
29//! ```
30//! # use tessera_ui::tessera;
31//! # #[tessera]
32//! # fn component() {
33//! use tessera_components::{
34//!     button::{ButtonArgs, button},
35//!     text::text,
36//!     text_editor::{TextEditorArgs, text_editor},
37//! };
38//! use tessera_ui::Dp;
39//! # use tessera_components::theme::{MaterialTheme, material_theme};
40//! # material_theme(|| MaterialTheme::default(), || {
41//!
42//! // Button example
43//! button(ButtonArgs::filled(|| { /* Handle click */ }), || {
44//!     text("Click me".to_string())
45//! });
46//!
47//! // Text editor example
48//! text_editor(TextEditorArgs::default());
49//! # });
50//! # }
51//! # component();
52//! ```
53#![deny(missing_docs, clippy::unwrap_used)]
54
55mod animation;
56mod padding_utils;
57mod selection_highlight_rect;
58
59pub mod alignment;
60pub mod app_bar;
61pub mod badge;
62pub mod bottom_sheet;
63pub mod boxed;
64pub mod button;
65pub mod button_groups;
66pub mod card;
67pub mod checkbox;
68mod checkmark;
69pub mod chip;
70pub mod column;
71pub mod date_picker;
72pub mod dialog;
73pub mod divider;
74pub mod floating_action_button;
75pub mod flow_column;
76pub mod fluid_glass;
77pub mod glass_button;
78pub mod glass_progress;
79pub mod glass_slider;
80pub mod glass_switch;
81pub mod icon;
82pub mod icon_button;
83pub mod image;
84pub mod image_vector;
85pub mod interaction_state;
86pub mod lazy_grid;
87pub mod lazy_list;
88pub mod lazy_staggered_grid;
89pub mod material_icons;
90pub mod modifier;
91pub mod theme;
92pub use pipelines::shape::command::RippleProps;
93pub use ripple_state::RippleState;
94pub mod flow_row;
95pub mod menus;
96pub mod navigation_bar;
97pub mod navigation_rail;
98pub mod pager;
99pub mod pipelines;
100pub mod pos_misc;
101pub mod progress;
102pub mod radio_button;
103pub mod ripple_state;
104pub mod row;
105pub mod scrollable;
106pub mod shape_def;
107pub mod side_bar;
108pub mod slider;
109pub mod spacer;
110pub mod surface;
111pub mod switch;
112pub mod tabs;
113pub mod text;
114mod text_edit_core;
115pub mod text_editor;
116pub mod time_picker;