Skip to main content

Crate snora_widgets

Crate snora_widgets 

Source
Expand description

§snora-widgets

Optional prefab iced::Element builders for snora’s skeleton slots.

These widgets are entirely optional — the snora engine (snora::render) consumes any iced::Element in any slot. Use these helpers to get a working app on screen quickly, and replace them with hand-written elements the moment you need to customize beyond what they expose.

§Crate boundary

This crate exists so that snora’s engine (the snora crate) can evolve independently of widget visuals. Applications normally do not depend on snora-widgets directly — snora re-exports everything here under the snora::widget module when its widgets feature is enabled (the default).

Direct snora-widgets use is supported for two cases:

  • Engine-only applications that opt out of snora’s widgets feature and want to add the widget set back selectively.
  • Alternative engines built against snora-core that want to reuse the widget visuals.

§ABDD

Every widget that has start/end asymmetry takes a snora_core::LayoutDirection argument and mirrors accordingly.

Modules§

direction
Direction-aware layout helpers.
style
Shared styling for snora’s built-in widgets.

Functions§

app_breadcrumb
Build a breadcrumb trail.
app_footer
Wrap content in a chrome-styled footer bar.
app_header
Build an application header.
app_side_bar
Render a SideBar as an icon rail.
app_tab_bar
Build a horizontal tab bar.
icon_element
Render an icon at the default size.
icon_element_sized
Render an icon at a custom pixel size.
render_menu
Render a single menu (header button + dropdown when active).