Skip to main content

Crate glassy_ui

Crate glassy_ui 

Source
Expand description

Glassy UI components.

Visual contract: Paper file Glassy UI.

Re-exports§

pub use motion::cubic_bezier;
pub use motion::ease_in_cubic;
pub use motion::ease_out_cubic;
pub use motion::init as init_motion;
pub use motion::use_motion_value;
pub use motion::AnimatePresence;
pub use motion::Ease;
pub use motion::Motion;
pub use motion::MotionStyle;
pub use motion::MotionValue;
pub use motion::MotionValueStore;
pub use motion::PresenceMode;
pub use motion::Stagger;
pub use motion::StyledSlot;
pub use motion::Transition;
pub use motion::Variants;
pub use theme::init as init_theme;
pub use theme::paint;
pub use theme::rgb;
pub use theme::ActiveTheme;
pub use theme::Theme;
pub use theme::ThemeKind;
pub use theme::FONT_FAMILY;

Modules§

motion
Declarative motion primitives inspired by motion.dev.
theme
Process-wide light/dark theme for Glassy UI.

Structs§

AlertDialog
Controlled destructive confirmation with safe focus and a locked scrim.
Assets
Bundled icons and Inter.
Badge
A compact, non-interactive status or count chip.
Button
Clickable glass button matching Paper Glassy UI → Buttons.
ButtonChrome
Per-variant paint used by crate::Button.
ButtonGroup
Clipped outline pill used for the Paper “Save draft | Publish” pair.
Checkbox
16×16 radius-6 mark matching Paper Glassy UI → Checkboxes.
CircularProgress
Determinate 24px circular progress matching Paper Glassy UI → Progress.
ContextMenu
Pointer-anchored menu. Same items as crate::DropdownMenu, origin at the click.
Dialog
Controlled modal overlay with Escape, scrim dismissal, and focus restoration.
DialogContent
Radius-10 dialog panel matching the Paper material.
DialogDescription
Supporting copy beneath a dialog title.
DialogFooter
Right-aligned dialog action row.
DialogHeader
Groups a dialog title and supporting description.
DialogTitle
Dialog heading text.
DropdownMenu
Trigger-anchored menu with pointer, keyboard, focus, and one-level submenu behavior.
DropdownMenuItem
FieldChrome
Per-state paint used by crate::Input.
Icon
SVG icon painted with text_color.
Input
Single-line field matching Paper Glassy UI → Inputs.
Kbd
Ghost glass chip matching Paper Glassy UI → Kbd. Not a button.
Label
13/500 name that sits above a field. Never inside it.
Popover
Trigger-anchored non-modal content with click, Escape, and outside dismissal.
PopoverContent
Secondary-glass popover panel matching Paper Glassy UI → Popovers.
PopoverDescription
Supporting page metadata used inside a PopoverContent.
PopoverTitle
Medium page-meta heading used inside a PopoverContent.
Progress
Determinate linear progress matching Paper Glassy UI → Progress.
Radio
16×16 circle matching Paper Glassy UI → Radios.
Select
Closed field is Input chrome plus a chevron. Open list is secondary glass.
SelectItem
One row in the open list.
Separator
1px rule matching Paper Glassy UI → Separators.
Skeleton
Pulsing secondary-glass placeholder matching Paper Glassy UI → Skeletons.
Spinner
Indeterminate spinner. Track + 120° arc, one turn every 700ms.
Switch
36×20 pill matching Paper Glassy UI → Switches.
Tooltip
Inverse-glass tooltip matching Paper Glassy UI → Tooltips.

Enums§

BadgeVariant
Visual treatment from Paper Glassy UI → Badges.
ButtonSize
Height / type scale from Paper.
ButtonVariant
Visual treatment from the Paper Buttons page.
CheckState
Unchecked / checked / mixed, from Paper Checkboxes.
DropdownMenuEntry
FieldState
Rest / focus / disabled / invalid paint for Input and Textarea.
IconName
Icons used on the Paper Buttons page.
PopoverPlacement
SeparatorOrientation
Horizontal 280×1 or vertical 1×36. Zinc at 12%, not a black rule.
SkeletonShape
Paper Skeleton shapes and their default geometry.
SpinnerSize
Paper sizes: 16 / 20 / 24 / 32.
SpinnerTone
Paper Color row: Default / Muted / Inverse / Destructive.
TooltipPlacement
Paper placements: above / below / start / end of the trigger.

Functions§

init
Bind kit keystrokes (text fields). Call once at startup.
load_fonts
Register the bundled Inter variable face. Call once at startup.
textarea
Many-line field. Same chrome as Input, 320×96, line-height 20.