Expand description
ratatui-core is the core library of the ratatui project, providing the essential building blocks for creating rich terminal user interfaces in Rust.
§Why ratatui-core
?
The ratatui-core
crate is split from the main ratatui
crate
to offer better stability for widget library authors. Widget libraries should generally depend
on ratatui-core
, benefiting from a stable API and reducing the need for frequent updates.
Applications, on the other hand, should depend on the main ratatui
crate, which includes
built-in widgets and additional features.
§Installation
Add ratatui-core
to your Cargo.toml
:
cargo add ratatui-core
§Features
anstyle
— enables conversions to / from colors, modifiers, and styles in the [‘anstyle’] cratepalette
— enables conversions from colors in thepalette
crate toColor
.underline-color
— enables the backend code that sets the underline color. Underline color is only supported by the Crossterm backend, and is not supported on Windows 7.scrolling-regions
— Use terminal scrolling regions to make some operations less prone to flickering. (i.e. Terminal::insert_before).serde
— enables serialization and deserialization of style and color types using theserde
crate. This is useful if you want to save themes to a file.
§Contributing
We welcome contributions from the community! Please see our CONTRIBUTING guide for more details on how to get involved.
§License
This project is licensed under the MIT License. See the LICENSE file for details.
Modules§
- This module provides the backend implementations for different terminal libraries.
- Provides types and traits for working with layout and positioning in the terminal.
style
contains the primitives used to control how your user interface will look.- Symbols and markers for drawing various widgets.
- Primitives for styled text.
- The
widgets
module contains theWidget
andStatefulWidget
traits, which are used to render UI elements on the screen.
Macros§
- assert_
buffer_ eq Deprecated Assert that two buffers are equal by comparing their areas and content.