Skip to main content

node_attributes

Function node_attributes 

Source
pub fn node_attributes(kind: &str) -> Vec<&'static str>
Expand description

Return the recognized attribute names for the given node kind.

Derived from the parser’s own known-props table (same source of truth as the validator’s “did you mean?” helper). Alias spellings (e.g. stroke_width alongside stroke-width) are de-duplicated to their canonical kebab-case form and the result is sorted for deterministic output.

Returns an empty slice for unrecognised kinds or kinds without a fixed prop list (e.g. “cell”, “row”, “column”).