# 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

</>

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

    pub type Clearable {
      IsClearable
      IsNotClearable
    }

### Constructors

-     IsClearable

-     IsNotClearable

## Config

</>

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

opaque </>

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

## Slot

</>

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

    pub type Slot {
      Leading
      Input
      Trailing
    }

### Constructors

-     Leading

-     Input

-     Trailing

# Values

## clear_label

</>

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

clear_label sets the value of clear_label for this SearchBar.

## clearable

</>

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

clearable sets the value of clearable for this SearchBar.

## default_clear_label

</>

    pub const default_clear_label: String

## default_clearable

</>

    pub const default_clearable: Clearable

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## from_config

</>

    pub fn from_config(config: Config) -> SearchBar

from_config creates a new SearchBar from the given configuration.

## new

</>

    pub fn new() -> SearchBar

new creates a new SearchBar with the default configuration.

## render

</>

    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

## render_config

</>

    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

## slot

</>

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

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

✨