Skip to main content

Crate iced_cube

Crate iced_cube 

Source
Expand description

Themeable application components for iced.

Every component sits behind a Cargo feature named after it, such as button or scroll-area, and each group (primitives, forms, layout, navigation, overlay, feedback, application, data) enables its members. The default full feature enables all of them.

use iced_cube::{button, lucide};
use iced_cube::primitives::button::Variant;

#[derive(Debug, Clone)]
enum Message { Save }

let save: iced::Element<'_, Message> = button("Save")
    .icon(lucide!(Save))
    .variant(Variant::Primary)
    .on_press(Message::Save)
    .into();

Re-exports§

pub use icon::Glyph;
pub use keys::Chord;
pub use keys::Keymap;
pub use application::command_palette;command-palette
pub use application::command_palette;command-palette
pub use application::menubar;menubar
pub use application::menubar;menubar
pub use application::status_bar;status-bar
pub use application::status_bar;status-bar
pub use application::toolbar;toolbar
pub use application::toolbar;toolbar
pub use data::data_table;data-table
pub use data::data_table;data-table
pub use data::json_viewer;json-viewer
pub use data::json_viewer;json-viewer
pub use data::log_viewer;log-viewer
pub use data::log_viewer;log-viewer
pub use data::property_grid;property-grid
pub use data::property_grid;property-grid
pub use data::tree;tree
pub use data::tree;tree
pub use data::virtual_list;virtual-list
pub use data::virtual_list;virtual-list
pub use feedback::alert;alert
pub use feedback::alert;alert
pub use feedback::badge;badge
pub use feedback::badge;badge
pub use feedback::progress;progress
pub use feedback::progress;progress
pub use feedback::spinner;spinner
pub use feedback::spinner;spinner
pub use feedback::avatar;avatar
pub use feedback::avatar;avatar
pub use feedback::avatar_group;avatar
pub use forms::combobox;combobox
pub use forms::combobox;combobox
pub use forms::select;select
pub use forms::select;select
pub use forms::textarea;textarea
pub use forms::textarea;textarea
pub use forms::field;field
pub use forms::label;field
pub use forms::label;field
pub use layout::accordion;accordion
pub use layout::accordion;accordion
pub use layout::card;card
pub use layout::card;card
pub use layout::resizable_panel;resizable-panel
pub use layout::resizable_panel;resizable-panel
pub use layout::split_pane;split-pane
pub use layout::split_pane;split-pane
pub use layout::hstack;stack
pub use layout::vstack;stack
pub use navigation::bottom_nav;bottom-nav
pub use navigation::bottom_nav;bottom-nav
pub use navigation::command;command
pub use navigation::command;command
pub use navigation::document_tabs;document-tabs
pub use navigation::document_tabs;document-tabs
pub use navigation::pagination;pagination
pub use navigation::pagination;pagination
pub use navigation::sidebar;sidebar
pub use navigation::sidebar;sidebar
pub use navigation::breadcrumb;breadcrumb
pub use navigation::breadcrumb;breadcrumb
pub use navigation::crumb;breadcrumb
pub use navigation::tab;tabs
pub use navigation::tabs;tabs
pub use navigation::tabs;tabs
pub use overlay::context_menu;context-menu
pub use overlay::context_menu;context-menu
pub use overlay::dropdown_menu;dropdown-menu
pub use overlay::dropdown_menu;dropdown-menu
pub use overlay::popover;popover
pub use overlay::popover;popover
pub use overlay::tooltip;tooltip
pub use overlay::tooltip;tooltip
pub use overlay::alert_dialog;dialog
pub use overlay::dialog;dialog
pub use overlay::dialog;dialog
pub use overlay::toast;toast
pub use overlay::toast;toast
pub use overlay::toasts;toast
pub use primitives::button;button
pub use primitives::button;button
pub use primitives::checkbox;checkbox
pub use primitives::checkbox;checkbox
pub use primitives::fab;fab
pub use primitives::fab;fab
pub use primitives::icon_button;icon-button
pub use primitives::icon_button;icon-button
pub use primitives::input;input
pub use primitives::input;input
pub use primitives::scroll_area;scroll-area
pub use primitives::scroll_area;scroll-area
pub use primitives::slider;slider
pub use primitives::slider;slider
pub use primitives::switch;switch
pub use primitives::switch;switch
pub use primitives::tappable;tappable
pub use primitives::tappable;tappable
pub use primitives::toggle;toggle
pub use primitives::toggle;toggle
pub use primitives::toggle_group;toggle-group
pub use primitives::toggle_group;toggle-group
pub use primitives::touch_clicks;touch-clicks
pub use primitives::touch_clicks;touch-clicks
pub use primitives::radio;radio
pub use primitives::radio;radio
pub use primitives::radio_group;radio
pub use primitives::separator;separator
pub use primitives::separator;separator
pub use primitives::vertical_separator;separator

Modules§

application
Application chrome: the menubar, toolbar, status bar and command palette.
data
Data display: trees, tables, long lists, logs, JSON documents and property grids.
feedback
Status and identity: alerts, avatars, badges, progress bars and spinners.
forms
Form building blocks: labels and fields, comboboxes, selects and textareas.
icon
Lucide icons rendered through iced’s svg widget.
keys
Keyboard shortcuts that apps can rebind.
layout
Arranging content: stacks, cards, accordions and resizable panels.
navigation
Moving between views and actions: bottom navigation, breadcrumbs, command lists, document tabs, pagination, the sidebar and tabs.
overlay
Floating content: dialogs, tooltips, toasts, popovers and menus.
primitives
Basic controls: buttons, icon buttons, floating action buttons, checkboxes, inputs, radios, scroll areas, separators, sliders, switches, toggles and toggle groups, plus the touch helpers tappable and touch clicks.
theme
Design tokens and the built-in light and dark themes.

Macros§

lucide
Resolves a Lucide icon to a Glyph at compile time.

Enums§

Icon