pub struct NodeStyle {Show 32 fields
pub background: String,
pub border: String,
pub outline_selected: String,
pub border_radius: String,
pub shadow: String,
pub shadow_selected: String,
pub min_width: String,
pub width: String,
pub opacity_dragging: f64,
pub padding_x: f64,
pub header_padding_y: f64,
pub body_padding_y: f64,
pub ports_padding_y: f64,
pub header_border_bottom: String,
pub header_background: String,
pub header_color: String,
pub header_font_size: String,
pub header_accent_height: f64,
pub field_label_color: String,
pub field_label_font_size: String,
pub field_gap: String,
pub field_label_min_width: String,
pub body_border_bottom: String,
pub anchor_layout: AnchorLayout,
pub cursor: String,
pub cursor_dragging: String,
pub cursor_resize: String,
pub resizable: bool,
pub resize_handle_width: f64,
pub resize_handle_color: String,
pub resize_min_width: f64,
pub resize_max_width: Option<f64>,
}Expand description
Style configuration for node cards.
Fields§
§background: String§border: String§outline_selected: StringSelection outline (uses CSS outline, not border — no layout shift).
border_radius: String§shadow: String§shadow_selected: String§min_width: String§width: StringFixed node width (CSS length, e.g. “256px”). When non-empty the node
renders at exactly this width; combined with the node’s overflow: hidden, body field content that doesn’t fit elides (the field value
spans are text-overflow: ellipsis). Empty = size to content above
min_width (the prior behavior).
opacity_dragging: f64§padding_x: f64Horizontal padding applied to all sections (header, body, ports).
header_padding_y: f64Vertical padding for the header section.
body_padding_y: f64Vertical padding for the body section (0 if no body).
ports_padding_y: f64Vertical padding for the ports section.
header_border_bottom: StringBorder between header and body/ports.
header_background: StringBackground for the header section.
header_color: StringHeader text color.
header_font_size: StringHeader font size.
header_accent_height: f64Accent line height in pixels (used when Node has accent_color prop).
field_label_color: StringBody field label color.
field_label_font_size: StringBody field label font size.
field_gap: StringBody field gap between label and content.
field_label_min_width: StringBody field label min width.
body_border_bottom: StringBody border bottom (between body and ports).
anchor_layout: AnchorLayoutHow input and output anchors are arranged within the node.
cursor: StringCursor over the parts of the node that start a drag — i.e. everything except anchor dots (crosshair) and form controls, which set their own.
cursor_dragging: StringCursor while a node drag is in progress.
cursor_resize: StringCursor over the resize handle, and node-wide while a resize is running.
resizable: boolWhether nodes can be width-resized by dragging their right edge.
resize_handle_width: f64Hit width of the right-edge resize handle, in pixels. Keep it below
AnchorStyle.dot_inset so the handle doesn’t sit under the output dots
(where they do overlap, the dots win).
resize_handle_color: StringHandle color while that node is being resized (it’s invisible otherwise — the cursor is the idle affordance).
resize_min_width: f64Floor for a dragged width. The effective floor is the larger of this and
min_width when that is a plain px value, so a dragged width can’t drift
below what CSS will actually render.
resize_max_width: Option<f64>Ceiling for a dragged width. None = unbounded.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeStyle
impl RefUnwindSafe for NodeStyle
impl Send for NodeStyle
impl Sync for NodeStyle
impl Unpin for NodeStyle
impl UnsafeUnpin for NodeStyle
impl UnwindSafe for NodeStyle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more