Skip to main content

Crate liora_components

Crate liora_components 

Source
Expand description

Liora’s public GPUI component prelude.

liora-components exports the visual and interactive controls used by the native Gallery and Docs applications: form controls, overlays, navigation, data display, charts, code blocks/editors, virtualized data views, and small utility widgets.

§Application setup

A GPUI app should initialize Liora once during application startup:

use gpui::App;
use liora_components::init_liora;

fn setup(cx: &mut App) {
    init_liora(cx);
}

The high-level liora_components::init_liora(cx) entry point initializes Liora core/theme state, global component services, and the app-level key bindings needed by inputs, text/code selection, overlays, Preview, Tour, and picker popups. Use liora_components::init_liora_with_mode(...) for an explicit Light or Dark startup mode.

§Stateful controls

Controls with focus, selection, open state, or text value should normally be stored as gpui::Entity<T> fields in a parent view. This preserves state across GPUI renders. Gallery and Docs are the maintained examples for this pattern.

§Architecture boundary

Liora components render native GPUI element trees. This crate does not require Tauri, WebView, HTML/CSS, DOM, or a browser runtime.

Re-exports§

pub use affix::*;
pub use alert::*;
pub use anchor::*;
pub use area_chart::*;
pub use autocomplete::*;
pub use avatar::*;
pub use backtop::*;
pub use badge::*;
pub use bar_chart::*;
pub use breadcrumb::*;
pub use button::*;
pub use button_group::*;
pub use calendar::*;
pub use card::*;
pub use carousel::*;
pub use cascader::*;
pub use chart::*;
pub use chart_scale::*;
pub use chart_shape::*;
pub use checkbox::*;
pub use checkbox_group::*;
pub use code_block::*;
pub use code_editor::*;
pub use col::*;
pub use collapse::*;
pub use color_picker::*;
pub use container::*;
pub use date_picker::*;
pub use date_time_picker::*;
pub use descriptions::*;
pub use dialog::*;
pub use divider::*;
pub use draggable::*;
pub use drawer::*;
pub use dropdown::*;
pub use empty::*;
pub use flex::*;
pub use form::*;
pub use heat_bar::*;
pub use horizontal_list::*;
pub use image::*;
pub use input::*;
pub use input_number::*;
pub use input_tag::*;
pub use label::*;
pub use line_chart::*;
pub use link::*;
pub use loading::*;
pub use mention::*;
pub use menu::*;
pub use message::*;
pub use message_box::*;
pub use motion::*;
pub use notification::*;
pub use operation::*;
pub use page_header::*;
pub use pagination::*;
pub use paragraph::*;
pub use pie_chart::*;
pub use popconfirm::*;
pub use popover::*;
pub use preview::*;
pub use progress::*;
pub use qr_code::*;
pub use radio::*;
pub use radio_group::*;
pub use rate::*;
pub use result::*;
pub use row::*;
pub use scrollbar::*;
pub use segment_ratio_bar::*;
pub use segmented::*;
pub use select::*;
pub use selectable_text::*;
pub use signal_meter::*;
pub use skeleton::*;
pub use slider::*;
pub use space::*;
pub use sparkline::*;
pub use splitter::*;
pub use statistic::*;
pub use steps::*;
pub use switch::*;
pub use table::*;
pub use tabs::*;
pub use tag::*;
pub use text::*;
pub use textarea::*;
pub use time_picker::*;
pub use timeline::*;
pub use timer::*;
pub use title::*;
pub use tooltip::*;
pub use tour::*;
pub use transfer::*;
pub use tree::*;
pub use tree_select::*;
pub use upload::*;
pub use virtualized_list::*;
pub use virtualized_table::*;
pub use virtualized_tree::*;
pub use watermark::*;
pub use window_frame::*;

Modules§

affix
alert
anchor
area_chart
autocomplete
avatar
backtop
badge
bar_chart
breadcrumb
button
button_group
calendar
card
carousel
cascader
chart
chart_scale
chart_shape
checkbox
checkbox_group
code_block
code_editor
col
collapse
color_picker
container
date_picker
date_time_picker
descriptions
dialog
divider
draggable
drawer
dropdown
empty
flex
form
heat_bar
horizontal_list
image
input
input_number
input_tag
label
layout_helpers
line_chart
link
loading
mention
menu
message
message_box
motion
notification
operation
page_header
pagination
paragraph
pie_chart
popconfirm
popover
preview
progress
qr_code
radio
radio_group
rate
result
row
scrollbar
segment_ratio_bar
segmented
select
selectable_text
signal_meter
skeleton
slider
space
sparkline
splitter
statistic
steps
switch
table
tabs
tag
text
textarea
time_picker
timeline
timer
title
tooltip
tour
transfer
tree
tree_select
upload
virtualized_list
virtualized_table
virtualized_tree
watermark
window_frame
Native app-window frame helpers.

Macros§

toast_error
toast_info
toast_success
toast_warning

Enums§

ButtonSize
ButtonVariant
ThemeMode

Functions§

init_liora
Initialize Liora’s recommended application runtime in one call.
init_liora_with_mode
Initialize Liora’s recommended application runtime with an explicit theme mode.