Expand description
§Zellij_widgets
Zellij_widgets is a pure-rust library designed for creating rich plugins in zellij, Leveraging the Wasmer runtime.
This crate combines the ratatui and crossterm to provide a comprehensive set of widgets and utilities for building zellij plugin applications.
§Important Concepts
Zellij does not have a continuous rendering loop like some UI frameworks, instead, rendering in Zellij typically occurs in response to user input or when the something has changes, this means that designing animations or expecting continuous rendering for dynamic UI updates is not feasible with zellij_widgets Take a look at zellij’s update interface
- Block : https://github.com/Kangaxx-0/zellij_widgets/tree/main/examples/showcase_block
- List : https://github.com/Kangaxx-0/zellij_widgets/tree/main/examples/showcase_list
- Tab : https://github.com/Kangaxx-0/zellij_widgets/tree/main/examples/showcase_tabs
- Scrollbar : https://github.com/Kangaxx-0/zellij_widgets/tree/main/examples/showcase_scrollbar
- Popup : https://github.com/Kangaxx-0/zellij_widgets/tree/main/examples/showcase_popup
- Gauge : https://github.com/Kangaxx-0/zellij_widgets/tree/main/examples/showcase_gauge
- Custom component : https://github.com/Kangaxx-0/zellij_widgets/tree/main/examples/showcase_custom_button
For an end-to-end demonstration, check out the session_manager
example, which provides a complete rewrite of an existing zellij plugin using zellij_widgets
.
Modules§
- buffer
- A set of utilities for managing the terminal buffer
- core
- This module contains the core functionality of the library.
- frame
- Provides the
Frame
type. - layout
- A collection of widgets and utilities to build terminal applications.
- plugin_
pane PluginPane
as it’s name suggests, is a pane that is used to render the plugin’s buffer to the host via wasm runtime.- prelude
- A prelude for conveniently writing applications using this library.
- style
- This module provides the basic building blocks for styling the terminal output.
- text
- A module for working with text, lines, spans, and graphemes.
- title
- This module holds the
Title
element and its related configuration types. A title is a piece ofBlock
configuration. - uis
- This module contains all the widgets that are available in the library.
- widget
- Provides the
Widget
andStateWidget
traits, they define how widgets are rendered in the terminal.
Macros§
- assert_
buffer_ content - This macro is useful for asserting that the content of a buffer is equal to a slice of strings.
- assert_
buffer_ eq - This macro is useful for asserting that two buffers are equal.
- debug_
line - This macro is useful for printing debug information to the buffer.
- queue
- Queues one or more command(s) for further execution.