pub struct ComposerProps {Show 15 fields
pub label: AccessibleName,
pub value: Option<ReadSignal<String>>,
pub default_value: String,
pub oninput: Option<EventHandler<String>>,
pub onsubmit: EventHandler<(String, Vec<Attachment>)>,
pub running: bool,
pub onstop: Option<EventHandler<()>>,
pub attachments: Vec<Attachment>,
pub onremove: Option<EventHandler<usize>>,
pub onfiles: Option<EventHandler<Vec<FileData>>>,
pub tools: Option<Element>,
pub placeholder: Option<String>,
pub contained: bool,
pub class: Option<String>,
pub attributes: Vec<Attribute>,
}Expand description
Properties for the Composer component.
Fields§
§label: AccessibleName§value: Option<ReadSignal<String>>§default_value: String§oninput: Option<EventHandler<String>>§onsubmit: EventHandler<(String, Vec<Attachment>)>§running: boolA run is in flight: the field is read-only and Send becomes Stop.
onstop: Option<EventHandler<()>>§attachments: Vec<Attachment>§onremove: Option<EventHandler<usize>>§onfiles: Option<EventHandler<Vec<FileData>>>Files dropped on the composer.
tools: Option<Element>Controls beside the send button: attach, model, tools.
placeholder: Option<String>§contained: boolDraw the composer as its own bordered surface.
class: Option<String>§attributes: Vec<Attribute>Implementations§
Source§impl ComposerProps
impl ComposerProps
Sourcepub fn builder() -> ComposerPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> ComposerPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building ComposerProps.
On the builder, call .label(...), .value(...)(optional), .default_value(...)(optional), .oninput(...)(optional), .onsubmit(...), .running(...)(optional), .onstop(...)(optional), .attachments(...)(optional), .onremove(...)(optional), .onfiles(...)(optional), .tools(...)(optional), .placeholder(...)(optional), .contained(...)(optional), .class(...)(optional), .attributes(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of ComposerProps.