Giter VIP home page Giter VIP logo

svelte-slim-select's Introduction

Beyonk

Svelte Slim Select

js-standard-style CircleCI

Svelte ready Select component which is built upon Slim Select

Demo

To run a demo, check this project out and run npm run dev

Usage

To use within a Svelte application:

npm i -D @beyonk/svelte-slim-select
import SlimSelect from '@beyonk/svelte-slim-select'
import 'slim-select/dist/slimselect.css' // or from a cdn as per slim-select docs.

export default {
	components: {
		Carousel,
		Slide
	}
}

Usage

<SlimSelect {data} {searchingText} {allowDeselect} />

<script>
  export default {
    data () {
      return {
        searchingText: 'Searching...',
        allowDeselect: true,
        data: {
          label: 'Animals',
          options: [
            {text: 'Cat'},
            {text: 'Dog'},
            {text: 'Bird'}
          ]
        }
      }
    }
  }
</script>

To make your life easy, all component options are those directly from [http://slimselectjs.com/options](The original documentation).

Events

You have two events:

  • on:change relates to SlimSelect's onChange event
  • on:beforeChange relates to SlimSelect's beforeOnChange event
<SlimSelect on:change="doSomething()" on:beforeChange="doOtherThing()" />

Select types

You can create a multi-select by sending the multiple: true property to the component:

<SlimSelect multiple="true" />

Thanks

Huge thanks to Nick A Walsh for his original carousel, Rich Harris for his immense work on Svelte, and Stu Plumbley for his limitless flexbox expertise.

svelte-slim-select's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ahpercival

svelte-slim-select's Issues

Svelte 3 Support

Hi there, I've gotten Slim Select working in my own svelte 3 project, but it's hacky and a little buggy. I'm just wondering if you had any interest in developing a Slim Select solution for Svelte 3, or if you could get me started on how to get it working? :}

I see you're busy with other (amazing!) projects, keep up the good work!

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.