Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

wired-listbox

v1.0.0arrow_drop_down
v1.0.0
v0.9.2
STATUS
Passing
DOWNLOADS
12
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
4 months ago
SIZE
13 KB
subject
A listbox control with Wired hand-drawn styling.
1 contributor
Use wired-listbox in your project ?
Copied
npm i @bit/wiredjs.wired-elements.wired-listbox
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
revert changes
reload
toggle layout
maximize
modifieddraft
chevron_left
chevron_right

wired listbox

wired-listbox

A listbox control with Wired hand-drawn styling. The selected item is highlighted. Can be vertical (default) or horizontal.

For demo and view the complete set of wired-elememts: wiredjs.com

Usage

Add wired-listbox to your project:

npm i wired-listbox

Import wired-listbox definition into your HTML page:

<script type="module" src="wired-listbox/lib/wired-listbox.js"></script>

Or into your module script:

import { WiredListbox } from "wired-listbox"

Use it in your web page:

 <wired-listbox id="combo" selected="two">
  <wired-item value="one">Number One</wired-item>
  <wired-item value="two">Number Two</wired-item>
  <wired-item value="three">Number Three</wired-item>
</wired-listbox>

<wired-listbox horizontal selected="two"
     style="--wired-item-selected-color: darkred; --wired-item-selected-bg: pink;">
  <wired-item value="one">Number One</wired-item>
  <wired-item value="two">Number Two</wired-item>
  <wired-item value="three">Number Three</wired-item>
</wired-listbox>

Properties

horizontal - Boolean indicated if the items are layed out horizontally. Default is false.

selected - Value of the selected item.

Custom CSS Variables

–wired-item-selected-bg Background color of the selected item.

–wired-item-selected-color Text color of the selected item.

Events

selected event fired when an item is selected by the user.

License

MIT License © Preet Shihn