Cargo Features

[dependencies]
ratatui = { version = "0.30.0-alpha.0", default-features = false, features = ["crossterm", "termion", "termwiz", "serde", "palette", "scrolling-regions", "all-widgets", "widget-calendar", "underline-color", "unstable", "unstable-rendered-line-info", "unstable-widget-ref", "unstable-backend-writer", "document-features"] }
default = all-widgets, crossterm, underline-color

The crate provides a set of optional features that can be enabled in your Cargo.toml file.

By default, we enable the crossterm backend as this is a reasonable choice for most applications as it is supported on Linux/Mac/Windows systems. We also enable the underline-color feature which allows you to set the underline color of text.

crossterm default

Generally an application will only use one backend, so you should only enable one of the following features: enables the CrosstermBackend backend and adds a dependency on crossterm.

Enables ratatui-crossterm

termion

enables the TermionBackend backend and adds a dependency on termion.

Enables ratatui-termion

termwiz

enables the TermwizBackend backend and adds a dependency on termwiz.

Enables ratatui-termwiz

serde

The following optional features are available for all backends: enables serialization and deserialization of style and color types using the serde crate. This is useful if you want to save themes to a file.

Enables serde, serde of ratatui-core and ratatui-widgets

palette

enables conversions from colors in the palette crate to Color.

Enables palette, palette of ratatui-core

scrolling-regions

Use terminal scrolling regions to make some operations less prone to flickering. (i.e. Terminal::insert_before).

Enables scrolling-regions of ratatui-core, optional ratatui-crossterm, optional ratatui-termion, and optional ratatui-termwiz

all-widgets default = widget-calendar

enables all widgets.

widget-calendar all-widgets

Widgets that add dependencies are gated behind feature flags to prevent unused transitive dependencies. The available features are: enables the calendar widget module and adds a dependency on time.

Enables time, calendar of ratatui-widgets

underline-color default

The following optional features are only available for some backends:

Enables the backend code that sets the underline color.
Underline color is only supported by the Crossterm and Termwiz backends, and is not supported on Windows 7.

Enables underline-color of ratatui-core, optional ratatui-crossterm, and optional ratatui-termwiz

unstable = unstable-backend-writer, unstable-rendered-line-info, unstable-widget-ref

The following features are unstable and may change in the future:

Enable all unstable features.

unstable-rendered-line-info unstable?

Enables the Paragraph::line_count Paragraph::line_width methods which are experimental and may change in the future. See Issue 293 for more details.

Enables unstable-rendered-line-info of ratatui-widgets

unstable-widget-ref unstable?

enables the WidgetRef and StatefulWidgetRef traits which are experimental and may change in the future.

unstable-backend-writer unstable?

Enables getting access to backends' writers. Only the Crossterm backend currently supports this.

Enables unstable-backend-writer of optional ratatui-crossterm

Features from optional dependencies

document-features implicit feature

Enables document-features

document-features:

Extract documentation for the feature flags from comments in Cargo.toml