Search

January 3, 2019 ยท View on GitHub

Search field with optional icons and buttons that respond to the input state.

Main features

  • Custom icons and buttons for states "focus", "focus and dirty", "dirty" and "none"
  • Custom Textfield display
  • Full width display

Usage

Options

Search specific options

ParameterRequiredTypeDefaultDescription
buttonsoptionalObjectObject with icons for each state: none, focus, focus_dirty and dirty. Each state ("none", "focus", "focus_dirty" and "dirty") can have buttons before and after the search field. Pass hyperscript or a component (or Array) to each.
fullWidthoptionalBooleanfalseA fullwidth search box is visually extended to the sides (with a height of 56px); inset search box has side (page) padding and is less tall (48px)
textfieldrequiredOptions object for Text FieldOptions for the TextField, for instance to specify the label

Common component options

ParameterRequiredTypeDefaultDescription
afteroptionalString, hyperscript or componentExtra content after main content; note that this content is placed right of preceding elements with a higher stacking depth
beforeoptionalString, hyperscript or componentExtra content before main content; note that this content is placed left of subsequent elements with a lower stacking depth
classNameoptionalStringExtra CSS class appended to pe-search
elementoptionalString"div"HTML element tag for the checkbox container
idoptionalStringHTML element id for the search field
styleoptionalObjectFor setting simple style attributes
toneoptionalString: "dark" or "light"Renders the component light on dark (sets class pe-dark-tone); use "light" to locally inverse (sets class pe-light-tone)

Composition

Search is composed from:

Search usually contains:

CSS classes

Future

  • History pane
  • Search results pane