UIChip

An chip component for presents selection and choices

Properties

Name

Type

Default

Description

thumbnail

VirtualHTMLElement | string

Thumbnail present with the chip

value

string

Required - Value presented in chip

size

string

"default"

Variations default|small|micro

type

string

"default"

onRemoveBtnClick

function

Required - Callback function when clicking remove button

Example

import {UIChip} from 'writer'

render($$) {
    const el = $$('div')

    return el.append(
        $$(UIChip, {
            thumbnail: 'https://image.png',
            value: 'Author name',
            onRemoveBtnClick: () => {}
        })
    )
}

Available types

The UIChip.props.type has following variations:

Name

default

primary

draft

alert

pending

warning

done

schedule

brand

Last updated