aforemny/material-components-web-elm/3.0.2

NOTE: the latest version is 9.1.0

Material.Chip.Input

Chips are compact elements that allow users to enter information, select a choice, filter content, or trigger an action.

Input chips are a variant of chips which enable user input by converting text into chips.

Table of Contents

Resources

Basic Usage

import Material.Chip.Input as InputChip


type Msg
    = ChipSelected String


main =
    InputChip.set []
        [ InputChip.chip InputChip.config "Chip One"
        , InputChip.chip InputChip.config "Chip Two"
        ]

Configuration

type Config msg

Configuration of an input chip

Default configuration of an input chip

Configuration Options

setOnClick : msg -> Config msg -> Config msg

Specify a message when the user clicks on a chip

Specify a message when the user clicks on a chip's trailing icon

setIcon : Maybe String -> Config msg -> Config msg

Specify whether a chip displays an icon

setAttributes : List (Attribute msg) -> Config msg -> Config msg

Specify additional attributes

Input Chips

set : List (Attribute msg) -> List (Chip msg) -> Html msg

Input chip container

chip : Config msg -> String -> Chip msg

Input chip view function

type Chip msg

Input chip type