npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

custom-ionic-search-bar

v1.0.3

Published

A more customizable Ionic Search Bar

Readme

custom-ionic-search-bar

Searchbars represent a text field that can be used to search through a collection. They can be displayed inside of a toolbar or the main content.

A Searchbar should be used instead of an input to search lists. A clear button is displayed upon entering input in the searchbar's text field. Clicking on the clear button will erase the text field and the input will remain focused. A cancel button can be enabled which will clear the input and lose the focus upon click.

Install

npm install ci-search-bar -SE

Usage

Angular

<!-- Default Searchbar -->
<ci-search-bar></ci-search-bar>

<!-- Searchbar with danger color -->
<ci-search-bar color="danger"></ci-search-bar>

<!-- Searchbar with value -->
<ci-search-bar value="Ionic"></ci-search-bar>

<!-- Searchbar with telephone type -->
<ci-search-bar type="tel"></ci-search-bar>

<!-- Searchbar with a custom debounce -->
<ci-search-bar debounce="500"></ci-search-bar>

<!-- Animated Searchbar -->
<ci-search-bar animated></ci-search-bar>

<!-- Searchbar with a placeholder -->
<ci-search-bar placeholder="Filter Schedules"></ci-search-bar>

<!-- Searchbar in a Toolbar -->
<ion-toolbar>
  <ci-search-bar></ci-search-bar>
</ion-toolbar>

Javascript

<!-- Default Searchbar -->
<ci-search-bar></ci-search-bar>

<!-- Searchbar with danger color -->
<ci-search-bar color="danger"></ci-search-bar>

<!-- Searchbar with value -->
<ci-search-bar value="Ionic"></ci-search-bar>

<!-- Searchbar with telephone type -->
<ci-search-bar type="tel"></ci-search-bar>

<!-- Searchbar with a custom debounce -->
<ci-search-bar debounce="500"></ci-search-bar>

<!-- Animated Searchbar -->
<ci-search-bar animated></ci-search-bar>

<!-- Searchbar with a placeholder -->
<ci-search-bar placeholder="Filter Schedules"></ci-search-bar>

<!-- Searchbar in a Toolbar -->
<ion-toolbar>
  <ci-search-bar></ci-search-bar>
</ion-toolbar>

Properties

| Property | Attribute | Description | Type | Default | | ------------------ | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ----------------- | | animated | animated | If true, enable searchbar animation. | boolean | false | | autocomplete | autocomplete | Set the input's autocomplete property. | "off" \| "on" | 'off' | | autocorrect | autocorrect | Set the input's autocorrect property. | "off" \| "on" | 'off' | | cancelButtonIcon | cancel-button-icon | Set the cancel button icon. | string | 'md-arrow-back' | | clearIcon | clear-icon | Set the clear icon. Defaults to "close". | string \| undefined | undefined | | color | color | The color to use from your application's color palette. Default options are: "primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", and "dark". For more information on colors, see theming. | string \| undefined | undefined | | debounce | debounce | Set the amount of time, in milliseconds, to wait to trigger the ionChange event after each keystroke. | number | 250 | | placeholder | placeholder | Set the input's placeholder. | string | 'Search' | | searchIcon | search-icon | The icon to use as the search icon. | string | 'search' | | showCancelButton | show-cancel-button | If true, show the cancel button. | boolean | false | | spellcheck | spellcheck | If true, enable spellcheck on the input. | boolean | false | | type | type | Set the type of the input. | "email" \| "number" \| "password" \| "search" \| "tel" \| "text" \| "url" | 'search' | | value | value | the value of the searchbar. | null \| string \| undefined | '' |

Events

| Event | Description | Detail | | ----------- | ----------------------------------------------- | -------------------- | | ionBlur | Emitted when the input loses focus. | void | | ionCancel | Emitted when the cancel button is clicked. | void | | ionChange | Emitted when the value has changed. | TextInputChangeEvent | | ionClear | Emitted when the clear input button is clicked. | void | | ionFocus | Emitted when the input has focus. | void | | ionInput | Emitted when a keyboard input ocurred. | KeyboardEvent |

Methods

setFocus() => void

Sets focus on the specified ci-search-bar. Use this method instead of the global input.focus().

Returns

Type: void

CSS Custom Properties

| Name | Description | | --------------------------- | ---------------------------------------- | | --background | Background of the searchbar | | --cancel-button-color | Color of the searchbar cancel button | | --clear-button-color | Color of the searchbar clear button | | --color | Color of the searchbar text | | --icon-color | Color of the searchbar icon | | --placeholder-color | Color of the searchbar placeholder | | --placeholder-font-style | Font style of the searchbar placeholder | | --placeholder-font-weight | Font weight of the searchbar placeholder | | --placeholder-opacity | Opacity of the searchbar placeholder |


Built with StencilJS