Skip to main content

render_toggle_aligned

Function render_toggle_aligned 

Source
pub fn render_toggle_aligned(
    frame: &mut Frame<'_>,
    area: Rect,
    state: &ToggleState,
    colors: &ToggleColors,
    label_width: Option<u16>,
) -> ToggleLayout
Expand description

Render a toggle control with optional label width alignment

§Arguments

  • frame - The ratatui frame to render to
  • area - Rectangle where the toggle should be rendered
  • state - The toggle state
  • colors - Colors for rendering
  • label_width - Optional minimum label width for alignment

§Returns

Layout information for hit testing