m3e/search_bar

SearchBar is a bar that provides a prominent entry point for search.

This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00

     DO NOT EDIT

Types

Clearable is whether the bar presents a button used to clear the search term.

pub type Clearable {
  IsClearable
  IsNotClearable
}

Constructors

  • IsClearable
  • IsNotClearable

Config is a public record for configuring this component.

pub type Config {
  Config(clearable: Clearable, clear_label: String)
}

Constructors

  • Config(clearable: Clearable, clear_label: String)

SearchBar is a View Model for this component

Fields:

  • clearable: Whether the bar presents a button used to clear the search term.
  • clear_label: The accessible label given to the button used to clear the search term.
pub opaque type SearchBar

Slots are used in child elements to insert content into this component

pub type Slot {
  Leading
  Input
  Trailing
}

Constructors

  • Leading
  • Input
  • Trailing

Values

pub fn clear_label(
  record: SearchBar,
  clear_label: String,
) -> SearchBar

clear_label sets the value of clear_label for this SearchBar.

pub fn clearable(
  record: SearchBar,
  clearable: Clearable,
) -> SearchBar

clearable sets the value of clearable for this SearchBar.

pub const default_clear_label: String
pub const default_clearable: Clearable
pub fn default_config() -> Config

default_config is the default configuration for this component.

pub fn from_config(config: Config) -> SearchBar

from_config creates a new SearchBar from the given configuration.

pub fn new() -> SearchBar

new creates a new SearchBar with the default configuration.

pub fn render(
  model: SearchBar,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render creates a Lustre Element for a SearchBar

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 SearchBar Config

pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot returns a Lustre Attribute(msg) for the given slot name

Search Document