Giter Site home page Giter Site logo

kwc-picker's Introduction

kwc-picker

Basic:

This is the basic one, with only the content to display the items.


<kwc-picker items="[[items]]"></kwc-picker>
const items = [
    {
        img: "https://kano.me/img1.png",
        label: "label 1",
    },
    {
        img: "https://kano.me/img2.png",
        label: "label 2",
    },
];

Properties:

  • HTML attributes:
    • items
      • required
      • default is []

Name:

This is the basic one, with the content and a custom string on top.


<kwc-picker items="[[items]]" name="My picker name"></kwc-picker>
const items = [
    {
        img: "https://kano.me/img1.png",
        label: "label 1",
    },
    {
        img: "https://kano.me/img2.png",
        label: "label 2",
    },
];

Properties:

  • HTML attributes:
    • items
      • required
      • default is []
    • name
      • optional
      • default is Assets

Icon:

This is the basic one, with the content and a custom icon on top.


<kwc-picker items="[[items]]" icon="https://goo.gl/1bdvq5"></kwc-picker>
const items = [
    {
        img: "https://kano.me/img1.png",
        label: "label 1",
    },
    {
        img: "https://kano.me/img2.png",
        label: "label 2",
    },
];

Properties:

  • HTML attributes:
    • items
      • required
      • default is []
    • icon
      • optional
      • default is the plus icon

Selected Index:

This is the basic one, with the content and the value is already been setted by the selected-index property.


<kwc-picker items="[[items]]" selected-index="1"></kwc-picker>
const items = [
    {
        img: "https://kano.me/img1.png",
        label: "label 1",
    },
    {
        img: "https://kano.me/img2.png",
        label: "label 2",
    },
];

Properties:

  • HTML attributes:
    • items
      • required
      • default is []
    • selected-index
      • optional
      • default is null

Filter:

With this one, you have a search input on the top to filter on label.


<kwc-picker items="[[items]]" filter></kwc-picker>
const items = [
    {
        img: "https://kano.me/img1.png",
        label: "label 1",
    },
    {
        img: "https://kano.me/img2.png",
        label: "label 2",
    },
];

Properties:

  • HTML attributes:
    • items
      • required
      • default is []
    • filter
      • optional
      • default is false

Filter On:

With this one, you have a search input on the top to filter on the filter-on value you give it.


<kwc-picker items="[[items]]" filter filter-on="text"></kwc-picker>
const items = [
    {
        img: "https://kano.me/img1.png",
        text: "text 1",
    },
    {
        img: "https://kano.me/img2.png",
        text: "text 2",
    },
];

Properties:

  • HTML attributes:
    • items
      • required
      • default is []
    • filter
      • optional
      • default is false
    • filter-on
      • optional
      • default is label

kwc-picker's People

Contributors

alicemarshall avatar denisdani avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.