<!-- GENERATED BY scripts/generate-widget-defaults.py; DO NOT EDIT BY HAND. -->
# Widget Defaults Reference
This file is generated from widget source initializers (`Default` impls and `new` constructors).
It is intended as an agent-facing quick reference for avoiding noisy builder chains.
> **Agent rule:** omit setters whose value equals the default shown here. Do not emit `.width(Length::Auto)`, `.border(true)`, `.focusable(true)`, or similar calls unless the surrounding code needs to make that default explicit for readability.
Regenerate with `python3 scripts/generate-widget-defaults.py --write`. Check freshness with `python3 scripts/generate-widget-defaults.py --check`.
## Accordion
Source: `src/widgets/accordion/mod.rs:45` (`Accordion`).
| Field | Default initializer |
|---|---|
| `items` | `Vec::new()` |
| `on_toggle` | `None` |
| `exclusive` | `false` |
| `gap` | `0` |
| `padding` | `Padding::default()` |
| `border` | `false` |
| `border_style` | `BorderStyle::Plain` |
| `style` | `Style::default()` |
| `header_style` | `Style::default()` |
| `header_hover_style` | `StyleSlot::Inherit` |
| `header_focus_style` | `StyleSlot::Inherit` |
| `header_padding` | `Padding::default()` |
| `content_padding` | `Padding::default()` |
| `content_border` | `false` |
| `content_border_style` | `BorderStyle::Plain` |
| `content_style` | `Style::default()` |
| `disabled_style` | `Style::default()` |
| `expanded_icon` | `"▼ ".into()` |
| `collapsed_icon` | `"▶ ".into()` |
| `focusable` | `false` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Auto` |
## Button
Source: `src/widgets/button/mod.rs:100` (`Button`).
| Field | Default initializer |
|---|---|
| `label` | `constructor/local value (not a default)` |
| `icon` | `None` |
| `icon_style` | `Style::default()` |
| `icon_gap` | `1` |
| `shortcut` | `None` |
| `shortcut_style` | `Style::default()` |
| `shortcut_gap` | `1` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `focus_style` | `StyleSlot::Inherit` |
| `align` | `Align::Center` |
| `width` | `Length::Auto` |
| `height` | `Length::Auto` |
| `variant` | `ButtonVariant::Bracket` |
| `border_style` | `BorderStyle::Plain` |
| `hover_border_style` | `None` |
| `focus_border_style` | `None` |
| `padding` | `Padding { left: 1, right: 1, top: 0, bottom: 0, }` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `on_click` | `None` |
| `on_key` | `None` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
## Checkbox
Source: `src/widgets/checkbox/mod.rs:187` (`Checkbox`).
| Field | Default initializer |
|---|---|
| `state` | `if checked { CheckboxState::Checked } else { CheckboxState::Unchecked }` |
| `label` | `None` |
| `variant` | `CheckboxVariant::Bracket` |
| `gap` | `1` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `focus_style` | `StyleSlot::Inherit` |
| `checked_style` | `Style::default()` |
| `unchecked_style` | `Style::default()` |
| `indeterminate_style` | `Style::default()` |
| `label_style` | `Style::default()` |
| `padding` | `Padding::default()` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `width` | `Length::Auto` |
| `height` | `Length::Auto` |
| `on_toggle` | `None` |
| `on_click` | `None` |
| `on_key` | `None` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
## Input
Source: `src/widgets/input/mod.rs:85` (`Input`).
| Field | Default initializer |
|---|---|
| `value` | `constructor/local value (not a default)` |
| `cursor` | `constructor/local value (not a default)` |
| `anchor` | `None` |
| `placeholder` | `None` |
| `prefix` | `None` |
| `suffix` | `None` |
| `truncate_head` | `false` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `focus_style` | `StyleSlot::Inherit` |
| `focus_content_style` | `Style::default()` |
| `hover_border_style` | `None` |
| `placeholder_style` | `Style::default()` |
| `focus_placeholder_style` | `Style::default()` |
| `prefix_style` | `Style::default()` |
| `focus_prefix_style` | `Style::default()` |
| `suffix_style` | `Style::default()` |
| `focus_suffix_style` | `Style::default()` |
| `caret_shape` | `None` |
| `caret_color` | `None` |
| `selection_style` | `StyleSlot::Inherit` |
| `border` | `true` |
| `border_style` | `BorderStyle::Plain` |
| `padding` | `Padding { left: 1, right: 1, top: 0, bottom: 0, }` |
| `mask` | `None` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `read_only` | `false` |
| `error` | `None` |
| `error_style` | `Style::default()` |
| `reserve_error_row` | `false` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Auto` |
| `on_change` | `None` |
| `on_edit` | `None` |
| `on_click` | `None` |
| `on_key` | `None` |
| `key_interceptor` | `None` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
## TextArea
Source: `src/widgets/text_area/mod.rs:451` (`TextArea`).
| Field | Default initializer |
|---|---|
| `value` | `constructor/local value (not a default)` |
| `cursor` | `0` |
| `anchor` | `None` |
| `placeholder` | `None` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `focus_style` | `StyleSlot::Inherit` |
| `focus_content_style` | `Style::default()` |
| `hover_border_style` | `None` |
| `caret_shape` | `None` |
| `caret_color` | `None` |
| `selection_style` | `StyleSlot::Inherit` |
| `unfocused_selection_style` | `StyleSlot::Inherit` |
| `show_selection_when_unfocused` | `true` |
| `placeholder_style` | `Style::default()` |
| `focus_placeholder_style` | `Style::default()` |
| `line_numbers` | `false` |
| `line_number_mode` | `TextAreaLineNumberMode::default()` |
| `line_number_style` | `Style::default()` |
| `min_line_number_width` | `0` |
| `wrap` | `true` |
| `color_strategy` | `None` |
| `language` | `None` |
| `theme` | `None` |
| `border` | `true` |
| `border_style` | `BorderStyle::Plain` |
| `padding` | `Padding::default()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `scroll_offset` | `None` |
| `scroll_to_line` | `None` |
| `scroll_behavior` | `ScrollBehavior::Instant` |
| `scroll_wheel` | `true` |
| `scroll_wheel_multiplier` | `None` |
| `on_change` | `None` |
| `on_edit` | `None` |
| `on_editor_state_change` | `None` |
| `on_scroll` | `None` |
| `on_scroll_to` | `None` |
| `on_click` | `None` |
| `on_key` | `None` |
| `key_interceptor` | `None` |
| `clear_bindings` | `None` |
| `vim_motions` | `false` |
| `vim_keymap` | `None` |
| `vim_config` | `TextAreaVimConfig::default()` |
| `on_vim_mode_change` | `None` |
| `on_image_paste` | `None` |
| `on_text_paste` | `None` |
| `images` | `Vec::new()` |
| `on_images_change` | `None` |
| `image_mode` | `TextAreaImageMode::default()` |
| `image_placeholder` | `"[Image]".into()` |
| `image_placeholder_style` | `Style::default()` |
| `image_placeholder_focus_style` | `Style::default()` |
| `image_placeholder_hover_style` | `Style::default()` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `read_only` | `false` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `newline_binding` | `None` |
| `tab_width` | `0` |
| `insert_tab` | `false` |
| `tab_display_width` | `8` |
| `scrollbar` | `true` |
| `scrollbar_config` | `ScrollbarConfig::default()` |
| `h_scrollbar` | `false` |
| `h_scrollbar_variant` | `ScrollbarVariant::default()` |
| `h_scrollbar_thumb` | `None` |
| `pin_scrollbar_focus_style` | `false` |
| `gutter_lines` | `None` |
| `gutter_col_width` | `0` |
| `gutter_gap` | `0` |
| `gutter` | `None` |
| `peer_source_lines` | `None` |
| `split_wrap_sync` | `None` |
| `split_wrap_side` | `None` |
| `diff_context_separator_click` | `None` |
| `split_wrap_padding_gutter_style` | `None` |
| `split_wrap_padding_style` | `None` |
| `copy_excluded_bytes` | `None` |
| `clipboard_transform` | `None` |
| `selection_excluded_lines` | `None` |
| `multi_click_select` | `true` |
| `triple_click_mode` | `crate::widgets::TripleClickSelectionMode::Line` |
| `sentinels` | `Vec::new()` |
| `on_sentinels_change` | `None` |
| `on_sentinel_event` | `None` |
| `on_sentinel_click` | `None` |
| `decorations` | `Vec::new()` |
| `virtual_texts` | `Vec::new()` |
## List
Source: `src/widgets/list/mod.rs:1302` (`List`).
| Field | Default initializer |
|---|---|
| `items` | `Arc::new([])` |
| `selected` | `Some(0)` |
| `scroll_keys` | `ScrollKeymap::default()` |
| `scroll_wheel` | `true` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `item_hover_style` | `StyleSlot::Inherit` |
| `active_style` | `StyleSlot::Inherit` |
| `selection_style` | `StyleSlot::Inherit` |
| `unfocused_selection_style` | `StyleSlot::Inherit` |
| `active_symbol` | `None` |
| `active_symbol_position` | `ListSymbolPosition::Left` |
| `active_symbol_style` | `None` |
| `selection_symbol` | `None` |
| `selection_symbol_right` | `None` |
| `selection_symbol_style` | `None` |
| `unfocused_selection_symbol_style` | `None` |
| `unselected_symbol` | `None` |
| `symbol_column` | `true` |
| `gutter_gap` | `0` |
| `gutter_for_non_selectable` | `false` |
| `selection_full_width` | `false` |
| `item_horizontal_padding` | `Padding::default()` |
| `header_horizontal_padding` | `Padding::default()` |
| `border` | `false` |
| `border_style` | `BorderStyle::Plain` |
| `title` | `None` |
| `title_style` | `Style::default()` |
| `padding` | `Padding::default()` |
| `scrollbar` | `false` |
| `scrollbar_config` | `ScrollbarConfig::default()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `on_select` | `None` |
| `on_item_click` | `None` |
| `on_activate` | `None` |
| `on_click` | `None` |
| `activate_on_click` | `true` |
| `on_scroll_to` | `None` |
| `on_key` | `None` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `show_scroll_indicators` | `false` |
| `scroll_indicator_style` | `Style::default()` |
| `empty_text` | `None` |
| `empty_text_style` | `Style::default()` |
| `force_scroll_to_selected` | `false` |
## ListConfig
Source: `src/widgets/list/mod.rs:78` (`ListConfig`).
| Field | Default initializer |
|---|---|
| `border` | `true` |
| `border_style` | `BorderStyle::Plain` |
| `padding` | `Padding::default()` |
| `style` | `Style::default()` |
| `selection_style` | `StyleSlot::Inherit` |
| `unfocused_selection_style` | `StyleSlot::Inherit` |
| `item_hover_style` | `None` |
| `selection_full_width` | `false` |
| `selection_symbol` | `None` |
| `selection_symbol_right` | `None` |
| `selection_symbol_style` | `None` |
| `unfocused_selection_symbol_style` | `None` |
| `symbol_column` | `true` |
| `gutter_gap` | `0` |
| `gutter_for_non_selectable` | `false` |
| `item_horizontal_padding` | `Padding::default()` |
| `header_horizontal_padding` | `Padding::default()` |
| `empty_text_style` | `Style::default()` |
| `scrollbar` | `false` |
| `scrollbar_config` | `ScrollbarConfig::default()` |
## ScrollView
Source: `src/widgets/scroll_view/mod.rs:92` (`ScrollView`).
| Field | Default initializer |
|---|---|
| `props` | `StackProps::default()` |
| `offset` | `None` |
| `horizontal_reveal_range` | `None` |
| `scroll_request` | `None` |
| `scroll_target` | `None` |
| `scroll_behavior` | `ScrollBehavior::default()` |
| `scroll_keys` | `ScrollKeymap::default()` |
| `scroll_wheel` | `true` |
| `scroll_wheel_multiplier` | `None` |
| `h_scroll_wheel_multiplier` | `None` |
| `scroll_wheel_behavior` | `ScrollWheelBehavior::default()` |
| `ambient_page_scroll` | `false` |
| `focusable` | `false` |
| `on_scroll` | `None` |
| `on_scroll_to` | `None` |
| `on_viewport_change` | `None` |
| `scrollbar` | `false` |
| `scrollbar_config` | `ScrollbarConfig::default()` |
| `show_scroll_indicators` | `false` |
| `scroll_indicator_style` | `Style::default()` |
| `clip_mode` | `ScrollClip::default()` |
| `estimated_child_height` | `3` |
| `scroll_state_key` | `None` |
| `axis` | `ScrollAxis::default()` |
| `h_scrollbar` | `false` |
| `h_scrollbar_config` | `ScrollbarConfig::default()` |
| `children` | `Vec::new()` |
## VStack/HStack shared StackProps
Source: `src/widgets/containers/mod.rs:209` (`StackProps`).
Note: Applies to the shared props backing stack container defaults.
| Field | Default initializer |
|---|---|
| `gap` | `0` |
| `padding` | `Padding::default()` |
| `style` | `Style::default()` |
| `align` | `Align::Start` |
| `justify` | `Justify::Start` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `focus_sizing` | `FocusSizing::None` |
| `focus_scope` | `FocusScope::None` |
| `border` | `false` |
| `border_style` | `BorderStyle::Plain` |
| `even_flex` | `false` |
## Frame/FrameNode
Source: `src/widgets/frame/node.rs:272` (`FrameNode`).
Note: `Frame` is the public builder; these defaults come from its `FrameNode` backing type.
| Field | Default initializer |
|---|---|
| `header` | `Box::new(crate::widgets::frame::BorderLabels::default())` |
| `footer` | `Box::new(crate::widgets::frame::BorderLabels::default())` |
| `tab_titles` | `Vec::new()` |
| `active_tab` | `0` |
| `active_tab_style` | `Style::default()` |
| `inactive_tab_style` | `Style::default()` |
| `tab_variant` | `TabVariant::default()` |
| `on_tab_change` | `None` |
| `padding` | `Padding::default()` |
| `decorations` | `Vec::new()` |
| `border` | `true` |
| `border_style` | `BorderStyle::Plain` |
| `border_edges` | `BorderEdges::All` |
| `border_merge_mode` | `BorderMergeMode::Exact` |
| `join_frame` | `false` |
| `style` | `Style::default()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `unfocused_height` | `None` |
| `focus_min_height` | `None` |
| `compact` | `false` |
| `collapsible` | `true` |
| `has_header` | `false` |
| `focusable` | `false` |
| `focus_scope` | `FocusScope::None` |
| `child_align` | `Align::Start` |
| `style_overrides` | `None` |
## ProgressBar
Source: `src/widgets/progress/mod.rs:239` (`ProgressBar`).
| Field | Default initializer |
|---|---|
| `progress` | `constructor/local value (not a default)` |
| `progress_style` | `ProgressStyle::Block` |
| `show_percentage` | `false` |
| `percentage_position` | `ProgressTextPosition::Right` |
| `label` | `None` |
| `label_position` | `ProgressTextPosition::Right` |
| `filled_style` | `Style::default()` |
| `filled_gradient` | `None` |
| `empty_style` | `Style::default()` |
| `label_style` | `Style::default()` |
| `style` | `Style::default()` |
| `padding` | `Padding::default()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Auto` |
| `draggable` | `false` |
| `step` | `None` |
| `inverted` | `false` |
| `on_change` | `None` |
| `on_click` | `None` |
| `focusable` | `false` |
| `focus_style` | `StyleSlot::Inherit` |
| `hover_style` | `StyleSlot::Inherit` |
| `target` | `None` |
| `target_style` | `Style::default()` |
| `target_symbol` | `'◆'` |
| `zones` | `Vec::new()` |
| `block_empty_bg_dim` | `0.85` |
## Spinner
Source: `src/widgets/spinner/mod.rs:184` (`Spinner`).
| Field | Default initializer |
|---|---|
| `spinner_style` | `SpinnerStyle::Dots` |
| `speed` | `SpinnerSpeed::Normal` |
| `frame` | `None` |
| `label` | `None` |
| `gap` | `1` |
| `style` | `Style::default()` |
| `label_style` | `Style::default()` |
| `width` | `Length::Auto` |
| `height` | `Length::Auto` |
## Select
Source: `src/widgets/select/mod.rs:56` (`Select`).
| Field | Default initializer |
|---|---|
| `options` | `Vec::new()` |
| `selected` | `None` |
| `placeholder` | `"Select...".into()` |
| `expanded` | `false` |
| `on_toggle` | `None` |
| `on_select` | `None` |
| `on_change` | `None` |
| `width` | `Length::Auto` |
| `disabled` | `false` |
| `button_variant` | `ButtonVariant::Outlined` |
| `button_style` | `Style::default()` |
| `button_hover_style` | `StyleSlot::Inherit` |
| `button_focus_style` | `StyleSlot::Inherit` |
| `button_disabled_style` | `Style::default()` |
| `button_border_style` | `BorderStyle::Plain` |
| `button_hover_border_style` | `None` |
| `button_focus_border_style` | `None` |
| `button_open_suffix` | `None` |
| `button_closed_suffix` | `None` |
| `button_suffix_style` | `Style::default()` |
| `list_title` | `None` |
| `list_title_style` | `Style::default()` |
| `list_config` | `ListConfig { border: true, border_style: BorderStyle::Plain, padding: Padding::default(), style: Style::default(), selection_style: StyleSlot::Inherit, unfocused_selection_style: StyleSlot::Inherit, selection_full_width: false, selection_symbol: Some("> ".into()), selection_symbol_right: None, selection_symbol_style: None, unfocused_selection_symbol_style: None, symbol_column: true, gutter_gap: 0, gutter_for_non_selectable: false, item_horizontal_padding: Padding::default(), header_horizontal_padding: Padding::default(), empty_text_style: Style::default(), item_hover_style: None, scrollbar: false, scrollbar_config: ScrollbarConfig::default(), }` |
| `list_width` | `None` |
| `list_height` | `Length::Px(6)` |
| `match_button_width` | `false` |
| `list_empty_text` | `None` |
| `list_disabled_style` | `Style::default()` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `on_key` | `None` |
## ComboBox
Source: `src/widgets/combo_box.rs:71` (`ComboBox`).
| Field | Default initializer |
|---|---|
| `items` | `Vec::new()` |
| `query` | `Arc::from("")` |
| `placeholder` | `Some("Type to filter...".into())` |
| `open` | `false` |
| `active_index` | `None` |
| `selected` | `None` |
| `allow_custom_value` | `false` |
| `width` | `Length::Flex(1)` |
| `list_width` | `None` |
| `list_height` | `Length::Px(8)` |
| `match_input_width` | `false` |
| `disabled` | `false` |
| `placement` | `PopoverPlacement::BelowStart` |
| `offset` | `PopoverOffset::ZERO` |
| `clamp` | `true` |
| `auto_flip` | `true` |
| `input_style` | `Style::default()` |
| `input_hover_style` | `StyleSlot::Inherit` |
| `input_focus_style` | `StyleSlot::Inherit` |
| `input_focus_content_style` | `Style::default()` |
| `input_disabled_style` | `Style::default()` |
| `input_hover_border_style` | `None` |
| `input_placeholder_style` | `Style::default()` |
| `input_focus_placeholder_style` | `Style::default()` |
| `input_suffix_open` | `" ▲".into()` |
| `input_suffix_closed` | `" ▼".into()` |
| `input_suffix_style` | `Style::default()` |
| `input_focus_suffix_style` | `Style::default()` |
| `list_config` | `ListConfig { border: true, border_style: BorderStyle::Plain, padding: Padding::default(), style: Style::default(), selection_style: StyleSlot::Inherit, unfocused_selection_style: StyleSlot::Inherit, selection_full_width: false, selection_symbol: None, selection_symbol_right: None, selection_symbol_style: None, unfocused_selection_symbol_style: None, symbol_column: true, gutter_gap: 0, gutter_for_non_selectable: false, item_horizontal_padding: Padding::default(), header_horizontal_padding: Padding::default(), empty_text_style: Style::default(), item_hover_style: None, scrollbar: false, scrollbar_config: ScrollbarConfig::default(), }` |
| `empty_text` | `Some("No matches".into())` |
| `on_query_change` | `None` |
| `on_open_change` | `None` |
| `on_active_index_change` | `None` |
| `on_commit` | `None` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `on_key` | `None` |
## MultiSelect
Source: `src/widgets/multi_select.rs:143` (`MultiSelect`).
| Field | Default initializer |
|---|---|
| `items` | `Arc::from([])` |
| `active_index` | `0` |
| `selected_indices` | `Vec::new()` |
| `max_selected` | `None` |
| `title` | `None` |
| `title_style` | `Style::default()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `list_config` | `ListConfig { border: true, border_style: BorderStyle::Plain, padding: Padding::default(), style: Style::default(), selection_style: StyleSlot::Inherit, unfocused_selection_style: StyleSlot::Inherit, selection_full_width: false, selection_symbol: Some("[ ] ".into()), selection_symbol_right: None, selection_symbol_style: None, unfocused_selection_symbol_style: None, symbol_column: true, gutter_gap: 0, gutter_for_non_selectable: false, item_horizontal_padding: Padding::default(), header_horizontal_padding: Padding::default(), empty_text_style: Style::default(), item_hover_style: None, scrollbar: false, scrollbar_config: ScrollbarConfig::default(), }` |
| `active_symbol` | `Some("[x] ".into())` |
| `active_symbol_style` | `None` |
| `active_style` | `StyleSlot::Inherit` |
| `unselected_symbol` | `Some("[ ] ".into())` |
| `description_style` | `Style::default()` |
| `description_placement` | `MultiSelectDescriptionPlacement::Inline` |
| `description_overflow` | `MultiSelectDescriptionOverflow::Truncate` |
| `description_selection` | `true` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `empty_text` | `None` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `on_key` | `None` |
| `on_active_index_change` | `None` |
| `on_toggle` | `None` |
| `on_change` | `None` |
| `on_commit` | `None` |
## Modal
Source: `src/widgets/modal.rs:37` (`Modal`).
| Field | Default initializer |
|---|---|
| `title` | `None` |
| `child` | `Spacer::new().into()` |
| `on_close` | `None` |
| `scope` | `OverlayScope::RootPortal` |
| `width` | `Length::Px(60)` |
| `height` | `Length::Auto` |
| `max_height` | `None` |
| `reserve_height` | `None` |
| `backdrop_style` | `Style::default()` |
| `frame_style` | `Style::default()` |
| `focus_style` | `StyleSlot::Inherit` |
| `auto_focus` | `true` |
| `border` | `true` |
| `border_style` | `BorderStyle::Plain` |
| `padding` | `1.into()` |
| `title_style` | `Style::default()` |
| `title_alignment` | `Align::Start` |
## Popover
Source: `src/widgets/popover/mod.rs:95` (`Popover`).
| Field | Default initializer |
|---|---|
| `trigger` | `Box::new(crate::widgets::Spacer::new().into())` |
| `content` | `Box::new(crate::widgets::Spacer::new().into())` |
| `on_close` | `None` |
| `open` | `false` |
| `scope` | `OverlayScope::RootPortal` |
| `placement` | `PopoverPlacement::default()` |
| `offset` | `PopoverOffset::ZERO` |
| `clamp` | `true` |
| `auto_flip` | `true` |
| `min_trigger_width` | `true` |
| `fit_trigger_width` | `false` |
| `max_width` | `None` |
| `anchor` | `None` |
| `capture_focus` | `true` |
| `auto_focus` | `true` |
## HexArea
Source: `src/widgets/hex_area/mod.rs:114` (`HexArea`).
| Field | Default initializer |
|---|---|
| `bytes` | `Arc::from([])` |
| `cursor` | `0` |
| `anchor` | `None` |
| `read_only` | `true` |
| `bytes_per_row` | `16` |
| `show_ascii` | `true` |
| `show_offsets` | `true` |
| `uppercase_hex` | `true` |
| `scroll_offset` | `None` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `focus_style` | `StyleSlot::Inherit` |
| `focus_content_style` | `Style::default()` |
| `selection_style` | `StyleSlot::Inherit` |
| `cursor_style` | `Style::default()` |
| `pending_edit_style` | `Style::default()` |
| `border` | `true` |
| `border_style` | `BorderStyle::Plain` |
| `padding` | `Padding::default()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `on_cursor_change` | `None` |
| `on_change` | `None` |
| `on_edit` | `None` |
| `on_scroll` | `None` |
| `on_key` | `None` |
## Hyperlink
Source: `src/widgets/hyperlink.rs:50` (`Hyperlink`).
| Field | Default initializer |
|---|---|
| `label` | `constructor/local value (not a default)` |
| `href` | `None` |
| `style` | `Style::new().underline()` |
| `hover_style` | `StyleSlot::Extend(Style::new().underline())` |
| `focus_style` | `StyleSlot::Extend(Style::new().underline().bold())` |
| `disabled_style` | `Style::default()` |
| `visited_style` | `None` |
| `width` | `Length::Auto` |
| `height` | `Length::Auto` |
| `align` | `Align::Start` |
| `padding` | `Padding::default()` |
| `focusable` | `false` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `disabled` | `false` |
| `visited` | `false` |
| `on_activate` | `None` |
| `on_key` | `None` |
## PanView
Source: `src/widgets/pan_view/mod.rs:238` (`PanView`).
| Field | Default initializer |
|---|---|
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `offset` | `None` |
| `on_pan` | `None` |
| `clamp` | `true` |
| `center_content` | `false` |
| `free_pan_margin` | `None` |
| `drag_to_pan` | `true` |
| `wheel_to_pan` | `true` |
| `keymap` | `PanKeymap::default()` |
| `key_step` | `(4, 2)` |
| `focusable` | `false` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `pan_state_key` | `None` |
| `child` | `None` |
## Slider
Source: `src/widgets/slider/mod.rs:93` (`Slider`).
| Field | Default initializer |
|---|---|
| `value` | `constructor/local value (not a default)` |
| `min` | `0.0` |
| `max` | `100.0` |
| `step` | `1.0` |
| `on_change` | `None` |
| `on_click` | `None` |
| `on_key` | `None` |
| `style` | `Style::default()` |
| `filled_track_style` | `Style::default()` |
| `filled_track_gradient` | `None` |
| `thumb_style` | `Style::default()` |
| `thumb_gradient` | `None` |
| `label` | `None` |
| `label_style` | `Style::default()` |
| `show_value` | `true` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Px(1)` |
| `padding` | `Padding::default()` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `hover_style` | `StyleSlot::Inherit` |
| `focus_style` | `StyleSlot::Inherit` |
| `focus_thumb_style` | `StyleSlot::Inherit` |
| `hover_thumb_style` | `StyleSlot::Inherit` |
| `thumb_symbol` | `"●".to_string()` |
| `track_symbol` | `"─".to_string()` |
| `filled_track_symbol` | `"━".to_string()` |
| `hover_thumb_symbol` | `None` |
## Table
Source: `src/widgets/table/mod.rs:356` (`Table`).
| Field | Default initializer |
|---|---|
| `rows` | `Arc::new([])` |
| `header` | `None` |
| `widths` | `Vec::new()` |
| `column_styles` | `Vec::new()` |
| `row_styles` | `Vec::new()` |
| `selected` | `Some(0)` |
| `column_spacing` | `1` |
| `row_gap` | `0` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `item_hover_style` | `StyleSlot::Inherit` |
| `alternating_row_style` | `None` |
| `row_style_full_width` | `false` |
| `selection_style` | `StyleSlot::Inherit` |
| `selection_symbol` | `None` |
| `selection_symbol_style` | `None` |
| `unselected_symbol` | `None` |
| `border` | `false` |
| `border_style` | `BorderStyle::Plain` |
| `padding` | `Padding::default()` |
| `scrollbar` | `false` |
| `scrollbar_config` | `ScrollbarConfig::default()` |
| `scroll_keys` | `ScrollKeymap::default()` |
| `scroll_wheel` | `true` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `on_select` | `None` |
| `on_activate` | `None` |
| `on_click` | `None` |
| `on_scroll_to` | `None` |
| `on_key` | `None` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `show_scroll_indicators` | `false` |
| `scroll_indicator_style` | `Style::default()` |
| `inspector` | `false` |
| `inspector_key_style` | `Style::default()` |
| `inspector_value_style` | `Style::default()` |
| `inspector_section_style` | `Style::default()` |
| `inspector_separator_style` | `Style::default()` |
| `inspector_indent_size` | `2` |
| `inspector_collapsed_symbol` | `Arc::from("▸")` |
| `inspector_expanded_symbol` | `Arc::from("▾")` |
| `inspector_separator_char` | `'─'` |
## Tabs
Source: `src/widgets/tabs/mod.rs:125` (`Tabs`).
| Field | Default initializer |
|---|---|
| `tabs` | `Arc::new([])` |
| `active` | `0` |
| `style` | `Style::default()` |
| `focus_style` | `StyleSlot::Inherit` |
| `hover_style` | `StyleSlot::Inherit` |
| `tab_hover_style` | `StyleSlot::Inherit` |
| `active_style` | `StyleSlot::Inherit` |
| `divider` | `'│'` |
| `caps` | `None` |
| `overflow` | `TabsOverflow::Clip` |
| `border` | `false` |
| `border_style` | `BorderStyle::Plain` |
| `padding` | `Padding::default()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Auto` |
| `on_change` | `None` |
| `on_click` | `None` |
| `on_key` | `None` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `focusable` | `false` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
## DraggableTabBar
Source: `src/widgets/draggable_tab_bar/mod.rs:502` (`DraggableTabBar`).
| Field | Default initializer |
|---|---|
| `tabs` | `Arc::new([])` |
| `active` | `0` |
| `style` | `Style::default()` |
| `focus_style` | `StyleSlot::Inherit` |
| `hover_style` | `StyleSlot::Inherit` |
| `tab_hover_style` | `StyleSlot::Inherit` |
| `active_style` | `StyleSlot::Inherit` |
| `close_style` | `Style::default()` |
| `close_hover_style` | `Style::default()` |
| `divider` | `'│'` |
| `border` | `false` |
| `border_style` | `BorderStyle::Plain` |
| `padding` | `Padding::default()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Auto` |
| `variant` | `DraggableTabBarVariant::Bordered` |
| `accent_symbol` | `'▏'` |
| `active_accent_symbol` | `'▎'` |
| `accent_style` | `Style::default()` |
| `active_accent_style` | `Style::default()` |
| `close_symbol` | `Arc::from("")` |
| `show_close_buttons` | `true` |
| `close_on_hover_only` | `false` |
| `tab_max_width` | `None` |
| `overflow` | `DraggableTabBarOverflow::Scroll` |
| `scroll_wheel` | `true` |
| `show_overflow_controls` | `true` |
| `overflow_style` | `Style::default()` |
| `overflow_hover_style` | `Style::default()` |
| `overflow_labels` | `OverflowLabels::default()` |
| `empty_text` | `None` |
| `empty_text_style` | `Style::default()` |
| `scroll_offset` | `0` |
| `show_file_icons` | `false` |
| `file_icon_style` | `FileIconStyle::NerdFont` |
| `file_icon_palette` | `FileIconPalette::default()` |
| `file_icon_overrides` | `HashMap::new()` |
| `bar_id` | `None` |
| `drag_group` | `None` |
| `draggable` | `true` |
| `drag_preview` | `true` |
| `reorder_mode` | `DragReorderMode::Live` |
| `drag_threshold` | `1` |
| `on_change` | `None` |
| `on_action` | `None` |
| `on_close` | `None` |
| `on_reorder` | `None` |
| `on_transfer` | `None` |
| `on_click` | `None` |
| `on_key` | `None` |
| `disabled` | `false` |
| `disabled_style` | `Style::default()` |
| `focusable` | `false` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
## DocumentView
Source: `src/widgets/document_view/mod.rs:329` (`DocumentView`).
| Field | Default initializer |
|---|---|
| `value` | `"".into()` |
| `layout_content_fingerprint` | `Cell::new(None)` |
| `content_type` | `None` |
| `formatter` | `None` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `wrap` | `true` |
| `line_numbers` | `false` |
| `min_line_number_width` | `0` |
| `line_number_separator` | `true` |
| `line_number_content_gap` | `0` |
| `line_number_mode` | `DocumentLineNumberMode::default()` |
| `line_number_style` | `Style::default()` |
| `highlight_full_width` | `false` |
| `border` | `true` |
| `border_style` | `BorderStyle::Plain` |
| `padding` | `Padding::default()` |
| `table_wrap` | `false` |
| `table_width_mode` | `DocumentTableWidthMode::default()` |
| `table_outer_frame` | `true` |
| `table_column_separators` | `true` |
| `table_row_separators` | `TableRowSeparators::default()` |
| `table_cell_padding` | `0` |
| `table_border_variant` | `BorderStyle::Plain` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `focus_style` | `StyleSlot::Inherit` |
| `focus_content_style` | `Style::default()` |
| `selection_style` | `StyleSlot::Inherit` |
| `doc_styles` | `DocumentStyles::default()` |
| `hover_border_style` | `None` |
| `scroll_offset` | `None` |
| `scroll_to_source_line` | `None` |
| `scroll_behavior` | `ScrollBehavior::default()` |
| `scrollbar` | `true` |
| `scrollbar_config` | `ScrollbarConfig::default()` |
| `h_scrollbar` | `false` |
| `h_scrollbar_variant` | `ScrollbarVariant::default()` |
| `h_scrollbar_thumb` | `None` |
| `pin_scrollbar_focus_style` | `false` |
| `scroll_wheel` | `true` |
| `scroll_wheel_multiplier` | `None` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `on_scroll` | `None` |
| `on_click` | `None` |
| `on_select` | `None` |
| `on_key` | `None` |
| `shared_selection_id` | `None` |
| `code_syntax_strategy` | `None` |
| `gutter_lines` | `None` |
| `gutter_col_width` | `0` |
| `gutter_gap` | `0` |
| `copy_excluded_source_lines` | `None` |
| `peer_source_lines` | `None` |
| `peer_source_fingerprint` | `Cell::new(None)` |
| `measure_base_key_cache` | `Cell::new(None)` |
| `split_wrap_sync` | `None` |
| `split_wrap_side` | `None` |
| `diff_split_pane` | `None` |
| `diff_context_separator_click` | `None` |
| `split_wrap_padding_gutter_style` | `None` |
| `split_wrap_padding_style` | `None` |
| `multi_click_select` | `true` |
| `triple_click_mode` | `crate::widgets::TripleClickSelectionMode::Line` |
| `passthrough_clicks` | `false` |
| `measure_cache` | `RefCell::new([None, None])` |
| `measure_format_cache` | `RefCell::new(None)` |
## FileTree
Source: `src/widgets/file_tree/mod.rs:346` (`FileTree`).
| Field | Default initializer |
|---|---|
| `root` | `constructor/local value (not a default)` |
| `entry_source` | `FileTreeEntrySource::default()` |
| `show_hidden` | `false` |
| `max_entries_per_dir` | `2_000` |
| `show_icons` | `true` |
| `icon_style` | `FileIconStyle::default()` |
| `icon_palette` | `FileIconPalette::default()` |
| `icon_overrides` | `HashMap::new()` |
| `show_arrows` | `true` |
| `indent_style` | `crate::widgets::IndentStyle::None` |
| `indent_guide_style` | `Style::default()` |
| `indent_guide_start_depth` | `1` |
| `indent_width` | `2` |
| `directory_icon` | `"[D]".into()` |
| `opened_directory_icon` | `"[D]".into()` |
| `file_icon` | `"[F]".into()` |
| `symlink_icon` | `"[L]".into()` |
| `other_icon` | `"[?]".into()` |
| `directory_label_style` | `Style::default()` |
| `file_label_style` | `Style::default()` |
| `loading_label` | `"loading...".into()` |
| `error_prefix` | `"error:".into()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `item_hover_style` | `StyleSlot::Inherit` |
| `selection_style` | `StyleSlot::Inherit` |
| `unfocused_selection_style` | `StyleSlot::Inherit` |
| `selected` | `None` |
| `clear_selection` | `false` |
| `selected_path` | `None` |
| `reveal_path` | `None` |
| `select_path` | `None` |
| `force_scroll_to_selected` | `false` |
| `expanded_paths` | `None` |
| `initial_expanded_paths` | `HashSet::new()` |
| `selection_symbol` | `None` |
| `selection_symbol_style` | `None` |
| `unfocused_selection_symbol_style` | `None` |
| `scrollbar` | `true` |
| `scrollbar_config` | `ScrollbarConfig::default()` |
| `scroll_keys` | `ScrollKeymap::default()` |
| `scroll_wheel` | `true` |
| `show_scroll_indicators` | `false` |
| `scroll_indicator_style` | `Style::default()` |
| `empty_text` | `Some("Directory is empty".into())` |
| `empty_text_style` | `Style::default()` |
| `empty_text_padding` | `Padding::default()` |
| `explorer` | `false` |
| `tree_focus_key` | `TREE_INPUT_KEY.into()` |
| `explorer_focus_key` | `EXPLORER_INPUT_KEY.into()` |
| `explorer_placeholder` | `"Find files...".into()` |
| `explorer_prefix` | `" ".into()` |
| `explorer_input_border` | `false` |
| `explorer_input_border_style` | `BorderStyle::Plain` |
| `explorer_input_padding` | `Padding { left: 1, right: 0, top: 0, bottom: 0, }` |
| `explorer_input_style` | `Style::default()` |
| `explorer_input_focus_style` | `StyleSlot::Inherit` |
| `explorer_input_focus_content_style` | `Style::default()` |
| `explorer_placeholder_style` | `Style::default()` |
| `explorer_focus_placeholder_style` | `Style::default()` |
| `explorer_match_style` | `Style::default()` |
| `explorer_divider` | `true` |
| `explorer_divider_join_frame` | `true` |
| `explorer_divider_char` | `'─'` |
| `explorer_divider_style` | `Style::default()` |
| `on_explorer_focus` | `None` |
| `on_explorer_blur` | `None` |
| `on_explorer_escape` | `None` |
| `activate_on_click` | `true` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `keymap` | `TreeKeymap::default()` |
| `git_status` | `true` |
| `highlight_changed_labels` | `false` |
| `change_source` | `FileTreeChangeSource::default()` |
| `change_view` | `FileTreeChangeView::default()` |
| `git_diff_stats` | `false` |
| `git_icon_style` | `GitIconStyle::NerdFont` |
| `git_refresh_nonce` | `0` |
| `git_marker_modified` | `"M".into()` |
| `git_marker_added` | `"A".into()` |
| `git_marker_deleted` | `"D".into()` |
| `git_marker_renamed` | `"R".into()` |
| `git_marker_untracked` | `"?".into()` |
| `git_marker_conflicted` | `"!".into()` |
| `git_style_modified` | `default_git_style_modified()` |
| `git_style_added` | `default_git_style_added()` |
| `git_style_deleted` | `default_git_style_deleted()` |
| `git_style_renamed` | `default_git_style_renamed()` |
| `git_style_untracked` | `default_git_style_untracked()` |
| `git_style_conflicted` | `default_git_style_conflicted()` |
| `change_suffix_style` | `Style::default()` |
| `change_suffix_priority` | `FileTreeSuffixPriority::default()` |
| `path_styles` | `HashMap::new()` |
| `on_select` | `None` |
| `on_activate` | `None` |
| `on_toggle` | `None` |
| `on_entry_request` | `None` |
## SearchPalette
Source: `src/widgets/search_palette/mod.rs:773` (`SearchPalette`).
| Field | Default initializer |
|---|---|
| `items` | `Arc::from([])` |
| `entries` | `Arc::from([])` |
| `sync_match_limit` | `DEFAULT_SYNC_MATCH_LIMIT` |
| `sync_selection` | `false` |
| `initial_query` | `"".into()` |
| `initial_selected_item_index` | `None` |
| `query` | `None` |
| `placeholder` | `"Search...".into()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `max_width` | `None` |
| `max_height` | `None` |
| `input_prefix` | `None` |
| `input_suffix` | `None` |
| `input_border` | `false` |
| `input_divider` | `true` |
| `input_divider_style` | `Style::default()` |
| `input_divider_join_frame` | `true` |
| `input_caret_shape` | `None` |
| `input_caret_color` | `None` |
| `input_border_style` | `BorderStyle::Plain` |
| `input_padding` | `Padding { left: 1, right: 1, top: 0, bottom: 0, }` |
| `input_style` | `Style::default()` |
| `input_hover_style` | `StyleSlot::Inherit` |
| `input_focus_style` | `StyleSlot::Inherit` |
| `input_focus_content_style` | `Style::default()` |
| `input_placeholder_style` | `Style::default()` |
| `input_focus_placeholder_style` | `Style::default()` |
| `input_prefix_style` | `Style::default()` |
| `input_focus_prefix_style` | `Style::default()` |
| `input_suffix_style` | `Style::default()` |
| `input_focus_suffix_style` | `Style::default()` |
| `list_config` | `ListConfig { border: false, border_style: BorderStyle::Plain, padding: Padding::default(), style: Style::default(), selection_style: StyleSlot::Inherit, unfocused_selection_style: StyleSlot::Inherit, selection_full_width: false, selection_symbol: Some("> ".into()), selection_symbol_right: None, selection_symbol_style: None, unfocused_selection_symbol_style: None, symbol_column: true, gutter_gap: 0, gutter_for_non_selectable: false, item_horizontal_padding: Padding::default(), header_horizontal_padding: Padding::default(), empty_text_style: Style::default(), item_hover_style: None, scrollbar: false, scrollbar_config: ScrollbarConfig::default(), }` |
| `list_symbol_column` | `None` |
| `list_hover_style` | `StyleSlot::Inherit` |
| `list_active_style` | `StyleSlot::Inherit` |
| `list_active_symbol` | `None` |
| `list_active_symbol_style` | `None` |
| `list_unselected_symbol` | `None` |
| `list_focusable` | `true` |
| `input_key` | `None` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `empty_text` | `Some("No matches".into())` |
| `item_style` | `Style::default()` |
| `active_item_style` | `None` |
| `header_style` | `Style::default()` |
| `description_style` | `Style::default()` |
| `active_description_style` | `None` |
| `focused_description_style` | `None` |
| `description_placement` | `DescriptionPlacement::Inline` |
| `description_separator` | `None` |
| `description_selection` | `true` |
| `description_overflow` | `DescriptionOverflow::Truncate` |
| `primary_truncate_description_first` | `true` |
| `match_style` | `Style::default()` |
| `show_scores` | `false` |
| `score_gradient` | `None` |
| `score_range` | `None` |
| `preserve_groups` | `false` |
| `preserve_item_order` | `false` |
| `navigation_wrap` | `true` |
| `match_mode` | `SearchMatchMode::default()` |
| `case_matching` | `CaseMatching::Smart` |
| `normalization` | `Normalization::Smart` |
| `input_key_interceptor` | `None` |
| `on_query_change` | `None` |
| `on_select` | `None` |
| `on_activate` | `None` |
| `render_item` | `None` |
| `item_status` | `None` |
| `item_gutter` | `None` |
## Tree
Source: `src/widgets/tree/mod.rs:27` (`Tree`).
| Field | Default initializer |
|---|---|
| `root` | `constructor/local value (not a default)` |
| `selected` | `None` |
| `clear_selection` | `false` |
| `force_scroll_to_selected` | `false` |
| `gap` | `0` |
| `icon_gap` | `1` |
| `show_icons` | `true` |
| `expanded_icon` | `"▼".into()` |
| `collapsed_icon` | `"▶".into()` |
| `leaf_icon` | `None` |
| `icon_style` | `Style::default()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `item_hover_style` | `StyleSlot::Inherit` |
| `selection_style` | `StyleSlot::Inherit` |
| `unfocused_selection_style` | `StyleSlot::Inherit` |
| `selection_symbol` | `None` |
| `selection_symbol_style` | `None` |
| `unfocused_selection_symbol_style` | `None` |
| `scrollbar` | `false` |
| `scrollbar_config` | `ScrollbarConfig::default()` |
| `scroll_keys` | `ScrollKeymap::default()` |
| `scroll_wheel` | `true` |
| `show_scroll_indicators` | `false` |
| `scroll_indicator_style` | `Style::default()` |
| `empty_text` | `None` |
| `empty_text_style` | `Style::default()` |
| `activate_on_click` | `true` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `on_select` | `None` |
| `on_activate` | `None` |
| `on_toggle` | `None` |
| `keymap` | `TreeKeymap::default()` |
| `focus_policy` | `None` |
| `focus_key` | `None` |
| `indent_style` | `IndentStyle::None` |
| `indent_guide_style` | `Style::default()` |
| `indent_gradient` | `None` |
| `solid_indent_connector_gap` | `false` |
| `selection_full_width` | `false` |
| `unselected_symbol` | `None` |
| `key_interceptor` | `None` |
| `indent_guide_start_depth` | `1` |
## Terminal
Source: `src/widgets/terminal/mod.rs:85` (`Terminal`).
| Field | Default initializer |
|---|---|
| `content` | `Arc::from("")` |
| `cursor_row` | `0` |
| `cursor_col` | `0` |
| `show_cursor` | `true` |
| `cursor_shape` | `CaretShape::Block` |
| `cursor_blinking` | `true` |
| `caret_color` | `None` |
| `color_lines` | `None` |
| `color_cache_key` | `0` |
| `screen` | `None` |
| `decorations` | `Arc::from([] as [TerminalDecoration; 0])` |
| `scrollback_offset` | `0` |
| `total_scrollback_rows` | `0` |
| `mouse_mode` | `MouseModeState::default()` |
| `key_modes` | `TerminalKeyModes::default()` |
| `images` | `Arc::from([])` |
| `paste_shortcut_behavior` | `TerminalPasteShortcutBehavior::Forward` |
| `selection` | `None` |
| `selection_controlled` | `false` |
| `selection_style` | `StyleSlot::Inherit` |
| `on_selection` | `None` |
| `on_resize` | `None` |
| `on_mouse_forward` | `None` |
| `scroll_wheel` | `true` |
| `on_scroll` | `None` |
| `on_scroll_to` | `None` |
| `style` | `Style::default()` |
| `hover_style` | `StyleSlot::Inherit` |
| `focus_style` | `StyleSlot::Inherit` |
| `focus_content_style` | `Style::default()` |
| `border` | `false` |
| `border_style` | `BorderStyle::default()` |
| `padding` | `Padding::default()` |
| `scrollbar` | `true` |
| `scrollbar_variant` | `ScrollbarVariant::default()` |
| `scrollbar_gap` | `0` |
| `scrollbar_thumb` | `None` |
| `scrollbar_thumb_style` | `None` |
| `scrollbar_thumb_focus_style` | `None` |
| `scrollbar_track_style` | `None` |
| `h_scrollbar` | `true` |
| `h_scrollbar_variant` | `ScrollbarVariant::default()` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `on_key` | `None` |
| `on_input` | `None` |
## DiffView
Source: `src/widgets/diff_view/mod.rs:285` (`DiffView`).
Note: `DiffView::new()` delegates to `new_internal("", "", None)`; argument-backed content fields are shown as constructor/local values.
| Field | Default initializer |
|---|---|
| `before` | `constructor/local value (not a default)` |
| `after` | `constructor/local value (not a default)` |
| `patch` | `None` |
| `mode` | `DiffViewMode::Split` |
| `backend` | `DiffViewBackend::TextArea` |
| `backend_explicit` | `false` |
| `width_override` | `None` |
| `height_override` | `None` |
| `editable` | `false` |
| `wrap_override` | `None` |
| `line_numbers_override` | `None` |
| `min_line_number_width_override` | `None` |
| `gutter_inset_override` | `None` |
| `scrollbar_override` | `None` |
| `h_scrollbar_override` | `None` |
| `focusable_override` | `None` |
| `outer_border` | `false` |
| `pane_border` | `true` |
| `highlight_full_width` | `false` |
| `single_scrollbar` | `false` |
| `join_frame` | `false` |
| `vertical_separator` | `false` |
| `vertical_separator_char` | `'│'` |
| `vertical_separator_style` | `Style::default()` |
| `scroll_offset` | `None` |
| `scroll_to_hunk` | `None` |
| `on_scroll` | `None` |
| `on_context_separator_click` | `None` |
| `context_separator_hover_style` | `None` |
| `text_area` | `constructor/local value (not a default)` |
| `document_view` | `constructor/local value (not a default)` |
| `diff_style` | `DiffPalette::default()` |
| `prefixes` | `DiffPrefixes::default()` |
| `show_prefixes` | `true` |
| `word_diff` | `true` |
| `trim_common_indent` | `true` |
| `shared_selection_id` | `None` |
| `language` | `None` |
| `theme` | `None` |
| `base_color_strategy` | `None` |
| `diff_data` | `constructor/local value (not a default)` |
| `context_lines` | `None` |
| `show_context_separator` | `true` |
| `context_separator_text` | `default_context_separator_text()` |
| `context_separator_min_lines` | `default_context_separator_min_lines()` |
| `context_expand_lines` | `default_context_expand_lines()` |
| `expanded_contexts` | `Vec::new()` |
| `pane_cache` | `RefCell::new(Vec::new())` |
## ManagedTerminal
Source: `src/widgets/managed_terminal.rs:100` (`ManagedTerminalProps`).
Note: `ManagedTerminal` is a component; defaults come from `ManagedTerminalProps`.
| Field | Default initializer |
|---|---|
| `config` | `TerminalPtyConfig::default()` |
| `scrollback` | `2000` |
| `initial_cols` | `120` |
| `initial_rows` | `24` |
| `on_status` | `None` |
| `auto_start` | `true` |
| `placeholder` | `Some(Arc::from("Starting terminal..."))` |
| `forward_mouse` | `true` |
| `scroll_wheel` | `true` |
| `resize_debounce` | `Duration::from_millis(16)` |
| `style` | `crate::style::Style::default()` |
| `focusable` | `true` |
| `tab_stop` | `true` |
| `on_focus` | `None` |
| `on_blur` | `None` |
| `width` | `Length::Flex(1)` |
| `height` | `Length::Flex(1)` |
## CommandPalette
Source: `src/widgets/command_palette.rs:325` (`CommandPalette`).
| Field | Default initializer |
|---|---|
| `props` | `CommandPaletteProps { on_close: None, show_disabled: false, width: Length::Px(80), height: Length::Px(20), backdrop_style: Style::default(), frame_style: Style::default(), border: true, border_style: BorderStyle::Plain, padding: 0.into(), title: None, title_style: Style::default(), title_alignment: Align::Start, scope: OverlayScope::RootPortal, }` |
## ContextMenu
Source: `src/widgets/context_menu.rs:42` (`ContextMenu`).
| Field | Default initializer |
|---|---|
| `trigger` | `constructor/local value (not a default)` |
| `items` | `Vec::new()` |
| `open` | `false` |
| `on_select` | `None` |
| `on_close` | `None` |
| `placement` | `PopoverPlacement::BelowStart` |
| `offset` | `PopoverOffset::ZERO` |
| `clamp` | `true` |
| `auto_flip` | `true` |
| `anchor` | `None` |
| `width` | `Length::Px(20)` |
| `height` | `Length::Auto` |
| `border` | `true` |
| `border_style` | `BorderStyle::Plain` |
| `padding` | `Padding::default()` |
| `style` | `Style::default()` |
| `selection_style` | `StyleSlot::Inherit` |
| `unfocused_selection_style` | `StyleSlot::Inherit` |
| `item_hover_style` | `None` |
| `selection_symbol` | `Some("> ".into())` |
| `selection_symbol_style` | `None` |
| `unfocused_selection_symbol_style` | `None` |
| `scrollbar` | `false` |
| `scrollbar_config` | `ScrollbarConfig::default()` |