# 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

</>

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

</>

Contained is whether the view features a persistent, filled search container.

    pub type Contained {
      IsContained
      IsNotContained
    }

### Constructors

-     IsContained

-     IsNotContained

## HideSearchIcon

</>

HideSearchIcon is whether to hide the search icon.

    pub type HideSearchIcon {
      IsHideSearchIcon
      IsNotHideSearchIcon
    }

### Constructors

-     IsHideSearchIcon

-     IsNotHideSearchIcon

## Open

</>

Open is whether the view is expanded to show results.

    pub type Open {
      IsOpen
      IsNotOpen
    }

### Constructors

-     IsOpen

-     IsNotOpen

## SearchView

opaque </>

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

## Slot

</>

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

    pub type Slot {
      Input
      OpenLeading
      OpenTrailing
      ClosedLeading
      ClosedTrailing
    }

### Constructors

-     Input

-     OpenLeading

-     OpenTrailing

-     ClosedLeading

-     ClosedTrailing

# Values

## clear_label

</>

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

clear_label sets the value of clear_label for this SearchView.

## close_label

</>

    pub fn close_label(
      record: SearchView,
      close_label: String,
    ) -> SearchView

close_label sets the value of close_label for this SearchView.

## contained

</>

    pub fn contained(
      record: SearchView,
      contained: Contained,
    ) -> SearchView

contained sets the value of contained for this SearchView.

## default_clear_label

</>

    pub const default_clear_label: String

## default_close_label

</>

    pub const default_close_label: String

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_contained

</>

    pub const default_contained: Contained

## default_hide_search_icon

</>

    pub const default_hide_search_icon: HideSearchIcon

## default_mode

</>

    pub const default_mode: search_view_mode.SearchViewMode

## default_open

</>

    pub const default_open: Open

## from_config

</>

    pub fn from_config(config: Config) -> SearchView

from_config creates a new SearchView from the given configuration.

## hide_search_icon

</>

    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.

## mode

</>

    pub fn mode(
      record: SearchView,
      mode: search_view_mode.SearchViewMode,
    ) -> SearchView

mode sets the value of mode for this SearchView.

## new

</>

    pub fn new() -> SearchView

new creates a new SearchView with the default configuration.

## open

</>

    pub fn open(record: SearchView, open: Open) -> SearchView

open sets the value of open for this SearchView.

## render

</>

    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

## 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 SearchView Config

## slot

</>

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

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

✨