Skip to main content

Crate egui_cha_ds

Crate egui_cha_ds 

Source
Expand description

egui-cha-ds: Design System for egui-cha

Provides themed UI components following Atomic Design principles:

  • Atoms: Basic building blocks (Button, Input, Badge, etc.)
  • Molecules: Combinations of atoms (SearchBar, FormField, etc.)
  • Theme: Consistent styling across all components

§Usage with TEA (The Elm Architecture)

Components are designed to work with egui-cha’s ViewCtx:

fn view(model: &Model, ctx: &mut ViewCtx<Msg>) {
    Button::primary("Click me").on_click(ctx, Msg::Clicked);
    Input::new()
        .placeholder("Enter text")
        .show_with(ctx, &model.text, Msg::TextChanged);
}

Modules§

audio
Audio atoms - Audio visualization and control components
extras_raw
Re-export egui_extras for advanced usage
icons
Phosphor Icons codepoints (Regular weight)
layout_helpers
Layout Helpers - Collision detection and spatial utilities
midi
MIDI atoms - MIDI input, monitoring, and editing components
mixer
Mixer atoms - Audio mixing and effects components
plot_raw
Re-export egui_plot for advanced usage
prelude
Prelude for convenient imports
semantics
Semantics - Domain-specific UI components
visual
Visual atoms - Video/graphics editing components

Macros§

cha
Main macro for declarative layout composition with ViewCtx

Structs§

ActiveNote
Active note with velocity
ArcSlider
A modern arc slider control
AutomationLane
Automation lane component
AutomationPlot
Automation curve plot for DAW-style parameter automation
AutomationPoint
An automation point
Badge
A badge/tag component
BarPlot
Bar chart plot
BeatIndicator
Compact beat indicator showing current beat position
BeatSync
Beat sync widget
BpmDisplay
Large numeric display for BPM/tempo
Button
A styled button component
ButtonGroup
A radio-style button group that returns normalized 0.0-1.0 values
CapacityGauge
Capacity gauge with threshold-based coloring
Card
A card container with optional header
CcValue
CC value with optional label
ChannelStrip
Channel strip component
Chat
Chat component - displays a scrollable chat view with input
ChatMessage
A single chat message
ChatState
State for Chat (owned by parent)
Checkbox
A checkbox component for TEA architecture
ClipCell
A single clip/phrase cell data
ClipGrid
Ableton Live style clip launcher grid
Code
Inline code styling
CodeBlock
Code block for multi-line code
ColorWheel
HSV Color wheel picker
CommandItem
A single command item
CommandPalette
Command Palette UI component
CommandPaletteState
State for CommandPalette (store in your Model)
ConfirmDialog
Convenience for confirmation dialogs
CrossFader
A/B Crossfader component
DashboardLayout
Dashboard layout builder
DashboardState
Persistent state for DashboardLayout
DataTable
Builder for table with typed data (uses egui_extras when available)
Effect
An effect in the rack
EffectParam
An effect parameter
EffectRack
Effect rack component
EnvelopeEditor
Envelope editor component
EnvelopePlot
Envelope plot for ADSR and similar curves
EnvelopePoint
Envelope point for custom envelopes
ErrorConsole
ErrorConsole component
ErrorConsoleState
State for ErrorConsole (owned by parent)
ErrorEntry
An error entry with timestamp
Fader
A vertical fader control
Form
Form builder for creating validated forms (TEA-style)
FrequencyPlot
Frequency response plot for EQ curves
Gradient
Gradient data
GradientEditor
Gradient editor widget
GradientStop
A color stop in the gradient
HeatmapCell
Data for a single heatmap cell (for callback-based usage)
HeatmapGrid
Heatmap grid for visualizing multi-agent states
Hsva
HSV color representation
Icon
Icon component using Phosphor Icons
IconMenu
Menu with icons
Input
A text input component with Theme styling
KeyBind
Keyboard shortcut definition
Knob
A rotary knob control
Layer
A single layer’s data
LayerStack
VJ-style layer stack with blend modes and opacity
LayoutPane
A pane in the node layout
LevelMeter
Level meter widget for audio visualization
LinePlot
A simple line plot with theme integration
Link
A hyperlink component
ListItem
A selectable list item with optional icon and badge
LogEntry
A single log entry
LogFilter
Filter settings for log display
LogStream
LogStream component - displays a scrollable log view
LogStreamState
State for LogStream (owned by parent)
MappableParam
A parameter that can be mapped
Mask
Mask data
MaskEditor
Mask editor widget
MaskPoint
A point in the mask (normalized 0.0-1.0)
MediaBrowser
Media browser widget
MediaItem
A media item in the browser
Menu
Vertical menu component (like Tabs but vertical)
MidiKeyboard
Piano keyboard display
MidiMapper
MIDI mapper widget
MidiMapping
A MIDI mapping assignment
MidiMonitor
MIDI monitor component
MidiNote
A MIDI note in the piano roll
Modal
A modal dialog component
MutedText
Builder for creating text with explicit muted color
Navbar
A navigation bar component
NodeLayout
Node layout container
NodeLayoutArea
Node layout area widget
Oscilloscope
Real-time oscilloscope display
OutputRouter
Output router widget
PadCell
A single pad cell data
PianoRoll
Piano roll component
Preview
Preview component
QuickActionBar
Quick Action Bar - horizontal toolbar of icon buttons
QuickActionColumn
Vertical variant of QuickActionBar
RouteConnection
A routing connection
RouteOutput
A routing output destination
RouteSource
A routing source
SamplePad
MPC-style sample trigger pad grid
SearchBar
A search bar with input and button
Select
A dropdown select component
SidebarConfig
Configuration for sidebars
Slider
A slider component
Sparkline
Compact inline chart for time-series data
SparklineBuffer
Fixed-capacity ring buffer for time-series data
Spectrum
A frequency spectrum visualization component
StatusIndicator
Visual status indicator with optional animation
StepSeq
TR-808/909 style step sequencer grid
Strip
Strip layout helper with theme integration
SyncState
Sync state data
TabPanel
Tab panel - content container that shows based on active tab
Table
A simple table component (without egui_extras)
Tabs
Tab bar component
Text
A styled text component
Theme
Design system theme containing all style tokens
ThemeConfig
TOML-friendly theme configuration with human-readable color format.
Timeline
Timeline component
TimelineMarker
A marker on the timeline
TimelineRegion
A region on the timeline (loop region, selection, etc.)
ToastContainer
Container for managing toast notifications
ToastId
Unique identifier for a toast
Toggle
A toggle switch component
TopBarConfig
Configuration for the top bar
Transform2D
2D Transform data
TransformGizmo
2D Transform gizmo for VJ/visual applications
TransportBar
Transport bar with playback controls
ValidatedInput
A text input with validation state
Waveform
A waveform visualization component
WorkspaceCanvas
Flexible workspace canvas with Tile and Free layout modes
WorkspacePane
A pane (window) in the workspace
XYPad
A 2D pad control for X/Y parameter adjustment

Enums§

Animation
Animation type for status indicator
ArcSliderSize
Arc slider size variants
ArcStyle
Arc style variants
ArrangeStrategy
Strategy for auto-arranging panes
AspectRatio
Aspect ratio presets
AutomationCurve
Automation curve type between points
AutomationEvent
Automation events
BadgeVariant
Badge variant
BeatDivision
Beat division for sync
BeatSyncEvent
Events emitted by BeatSync
BlendMode
Blend modes for layer compositing
BrowserViewMode
Browser view mode
ButtonVariant
Button variant for different styles
CellState
Cell state for color mapping
ChannelEvent
Channel strip events
ChatRole
Message sender role
ClipState
Clip state for visual representation
ColumnWidth
Column width specification (re-exported for convenience)
CommandEntry
An entry in the command palette (item, separator, or group)
ConfirmResult
Result of showing a confirm dialog
ContextMenuItem
Context menu item
CrossfaderCurve
Crossfader curve types
CrossfaderOrientation
Crossfader orientation
CurveType
Curve type between points
DashboardEvent
Events emitted by DashboardLayout
DataColumnWidth
Column width specification
DisplaySize
BPM display size variants
DisplayStyle
BPM display style
Edge
Edge direction
EffectCategory
Effect type category
EnvelopeEvent
Envelope events
ErrorConsoleMsg
Messages for ErrorConsole
ErrorLevel
Error severity level for display in ErrorConsole
FaderSize
Size variant for Fader
GizmoHandle
Which part of the gizmo is being manipulated
GradientDirection
Gradient direction
GradientEvent
Events emitted by GradientEditor
GroupOrientation
Button group orientation
GroupSize
Button group size variants
KeyboardEvent
Keyboard events
KnobSize
Size variant for Knob
LayerEvent
Events emitted by LayerStack
LayoutMode
Layout mode for workspace
LearnState
Learn mode state
ListItemSize
Size variant for ListItem
LockLevel
Lock level for panes and canvas
MaskEvent
Events emitted by MaskEditor
MaskShape
Mask shape type
MediaBrowserEvent
Events emitted by MediaBrowser
MediaType
Media type
MeterMode
Level meter display mode
MeterOrientation
Level meter orientation
MidiMapperEvent
Events emitted by MidiMapper
MidiMessage
MIDI message types for display
MidiMsgType
MIDI message type for mapping
MonitorMode
Monitor display mode
NodeLayoutEvent
Events emitted by NodeLayoutArea
OutputType
Output type
PadEvent
Events from pad interactions
PianoRollEvent
Piano roll events
PreviewEvent
Preview events
PreviewState
Preview state indicator
QuickActionSize
Size variant for quick action buttons
QuickActionStyle
Visual style for quick action buttons
RackEvent
Effect rack events
RackOrientation
Effect rack orientation
RouterEvent
Events emitted by OutputRouter
ScopeMode
Oscilloscope display mode
SnapTarget
Snap target for visual feedback
SourceType
Source type
SpectrumColorMode
Color mode for spectrum bars
Status
Status state with predefined colors and animations
StepEvent
Events from step sequencer interactions
StepValue
Step value representing the state of a single step
StripDirection
Strip direction
StripSize
Size specification for strip cells
TextSize
Text size variants based on theme typography tokens
ThemeLoadError
Error loading theme from file
ThemeSaveError
Error saving theme to file
ThemeVariant
Theme variant
TimeFormat
Time display format
TimelineEvent
Timeline events
TimestampFormat
Timestamp display format
ToastPosition
Position for toast container
ToastVariant
Toast variant determines the visual style
TransformEvent
Transform events emitted by the gizmo
TransformMode
Transform mode
TransportEvent
Transport control events
TriggerMode
Oscilloscope trigger mode
ValidationState
Validation state for form inputs
WaveformStyle
Waveform display style
WheelStyle
Color wheel style
WorkspaceEvent
Events emitted by WorkspaceCanvas

Traits§

ContextMenuExt
Extension trait for adding context menu to Response
LightweightTheme
Minimal theme trait for quick theme creation.
ResponseExt
Extension trait for adding themed tooltips to any Response
ThemeProvider
Trait for converting external theme systems to DS Theme

Functions§

dashboard_3col
Create a simple three-column dashboard layout
dashboard_full
Create a dashboard with top bar and three columns
navbar
Simple horizontal nav bar (functional style)
setup_fonts
Set up icon fonts for egui-cha-ds components.
sidebar
Sidebar navigation (vertical)