Skip to main content

euv_core/vdom/attribute/
enum.rs

1use crate::*;
2
3/// Represents the value of an HTML attribute.
4///
5/// Attributes can be static text, reactive signals, event handlers, dynamic expressions,
6/// or CSS class references.
7#[derive(Clone, CustomDebug)]
8pub enum AttributeValue {
9    /// A static string value.
10    Text(String),
11    /// A dynamic signal-backed value.
12    #[debug(skip)]
13    Signal(Signal<String>),
14    /// An event handler callback.
15    #[debug(skip)]
16    Event(NativeEventHandler),
17    /// A dynamic expression value of any type (for component props).
18    Dynamic(String),
19    /// A CSS class reference created by the `class!` macro.
20    Css(Css),
21}