m3e/search_view
SearchView is a surface that presents suggestions and results for a search.
This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00
DO NOT EDIT
Types
Config is a public record for configuring this component.
pub type Config {
Config(
contained: Contained,
mode: search_view_mode.SearchViewMode,
open: Open,
clear_label: String,
close_label: String,
hide_search_icon: HideSearchIcon,
)
}
Constructors
-
Config( contained: Contained, mode: search_view_mode.SearchViewMode, open: Open, clear_label: String, close_label: String, hide_search_icon: HideSearchIcon, )
Contained is whether the view features a persistent, filled search container.
pub type Contained {
IsContained
IsNotContained
}
Constructors
-
IsContained -
IsNotContained
HideSearchIcon is whether to hide the search icon.
pub type HideSearchIcon {
IsHideSearchIcon
IsNotHideSearchIcon
}
Constructors
-
IsHideSearchIcon -
IsNotHideSearchIcon
Open is whether the view is expanded to show results.
pub type Open {
IsOpen
IsNotOpen
}
Constructors
-
IsOpen -
IsNotOpen
SearchView is a View Model for this component
Fields:
- contained: Whether the view features a persistent, filled search container.
- mode: The behavior mode of the view.
- open: Whether the view is expanded to show results.
- clear_label: The accessible label given to the button used to clear the search term.
- close_label: The accessible label given to the button used to collapse the view.
- hide_search_icon: Whether to hide the search icon.
pub opaque type SearchView
Values
pub fn clear_label(
record: SearchView,
clear_label: String,
) -> SearchView
clear_label sets the value of clear_label for this SearchView.
pub fn close_label(
record: SearchView,
close_label: String,
) -> SearchView
close_label sets the value of close_label for this SearchView.
pub fn contained(
record: SearchView,
contained: Contained,
) -> SearchView
contained sets the value of contained for this SearchView.
pub const default_clear_label: String
pub const default_close_label: String
pub fn default_config() -> Config
default_config is the default configuration for this component.
pub const default_contained: Contained
pub const default_hide_search_icon: HideSearchIcon
pub const default_mode: search_view_mode.SearchViewMode
pub const default_open: Open
pub fn from_config(config: Config) -> SearchView
from_config creates a new SearchView from the given configuration.
pub fn hide_search_icon(
record: SearchView,
hide_search_icon: HideSearchIcon,
) -> SearchView
hide_search_icon sets the value of hide_search_icon for this SearchView.
pub fn mode(
record: SearchView,
mode: search_view_mode.SearchViewMode,
) -> SearchView
mode sets the value of mode for this SearchView.
pub fn open(record: SearchView, open: Open) -> SearchView
open sets the value of open for this SearchView.
pub fn render(
model: SearchView,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render creates a Lustre Element for a SearchView
pub fn render_config(
c: Config,
attributes: List(attribute.Attribute(msg)),
children: List(element.Element(msg)),
) -> element.Element(msg)
render_config creates a Lustre Element from a SearchView Config
pub fn slot(s: Slot) -> attribute.Attribute(msg)
slot returns a Lustre Attribute(msg) for the given slot name