Giter Site home page Giter Site logo

hirohe / tweakpane-plugin-search-list Goto Github PK

View Code? Open in Web Editor NEW
7.0 2.0 0.0 275 KB

plugin for tweakpane, searchable select list

License: MIT License

JavaScript 27.82% TypeScript 60.71% SCSS 7.05% HTML 4.42%
tweakpane plugin select searchable

tweakpane-plugin-search-list's Introduction

Tweakpane plugin Search list

version

This is a plugin for Tweakpane.

add searchable select list for tweakpane.

required version [email protected]

Install

npm i tweakpane-plugin-search-list
# or
yarn add tweakpane-plugin-search-list

Usage

import { Pane } from 'tweakpane';
import TweakpaneSearchListPlugin from 'tweakpane-plugin-search-list';

const pane = new Pane();
pane.registerPlugin(TweakpaneSearchListPlugin);

const data = { language: 'JavaScript' };
pane.addInput(data, 'language', {
  // use search-list
  view: 'search-list',
  options: {
    JavaScript: 'JavaScript',
    TypeScript: 'TypeScript',
    Java: 'Java',
    Go: 'Go',
    Dart: 'Dart',
    'C++': 'C++',
    'Object C': 'Object C',
    'C#': 'C#',
    Python: 'Python'
  }
});
// ...

Options

pane.addInput(data, 'field', {
  view: 'search-list',
  options: {
    // ...
  },
  noDataText: 'no data',
  debounceDelay: 250,
});
param description type default
noDataText text to show if no options matched string 'no data'
debounceDelay delay time to apply on lodash.debounce, for debounce search number 250

CSS variables

:root {
  --tp-plugin-select-box-bg-color: --input-background-color;
  --tp-plugin-select-no-data-color: #fff;
  --tp-plugin-select-option-bg-hover: rgb(129, 129, 129);
}

tweakpane-plugin-search-list's People

Contributors

hirohe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

tweakpane-plugin-search-list's Issues

Strict peer dependencies

Hi there!

I'm interested in taking this Tweakpane plugin for a spin, but the strict peer dependencies would force me to use npm update --force or npm update --legacy-peer-deps in order to do so, because you've listed very specific versions for Lodash and Tweakpane as the library's peer dependencies.

I was hoping these could be loosened up with a caret:

  "peerDependencies": {
    "lodash": "^4.17.21",
    "tweakpane": "^2.3.0"
  },

I expect semver well prevent any breakages here.

Cheers!

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.