shore/ui
Values
pub fn align(alignment: Align, node: Node(a)) -> Node(a)
Sets alignment of all child nodes
pub fn bar2(color: Color, node: Node(a)) -> Node(a)
A row with a background color, containing items
pub fn box(
children: List(Node(a)),
title: Option(String),
) -> Node(a)
A box container element for holding other nodes
pub fn button(text: String, key: Key, event: a) -> Node(a)
A button assigned to a key press to execute an event
pub fn col(children: List(Node(a))) -> Node(a)
A container element for holding other nodes over multiple lines
pub fn graph(
width: Size,
height: Size,
points: List(Float),
) -> Node(a)
An extremely simple plot
pub fn input(
label: String,
value: String,
width: Size,
event: fn(String) -> a,
) -> Node(a)
A field for text input
pub fn keybind(key: Key, event: a) -> Node(a)
A non-visible button assigned to a key press to execute an event
pub fn progress(
width: Size,
max: Int,
value: Int,
color: Color,
) -> Node(a)
A progress bar, will automatically calculate fill percent based off max and current values
pub fn row(children: List(Node(a))) -> Node(a)
A container element for holding other nodes in a single line
pub fn table_kv(
width: Size,
table: List(List(String)),
) -> Node(a)
A Key-Value style table layout
pub fn text_styled(
text: String,
fg: Option(Color),
bg: Option(Color),
) -> Node(a)
A text string with colored foreground and/or background