🌿 A growing search
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
dist
example/webpack
images
lib
src/styles
test
.babelrc
.gitignore
.npmignore
.travis.yml
CHANGELOG.md
LICENSE.md
README.md
bower.json
bs-config.js
build.js
dev-server.js
package.json
prod.js
rollup.config.js
screenshot.gif
yarn.lock

README.md

Tuta

🌿 A growing search

screenshot

Install or Download

yarn add tuta
npm i -S tuta

Or access to releases page. Then, download the latest version.

Usage

First, if you read as a separate file

<script src="/path/tp/tuta.js"></script>
import Tuta from 'tuta';

new Tuta({
  target: document.getElementById('form')
  data: {
    style: {
      // defaults
      width: '10em',
      height: '2em',
      border: '1px solid #222',
      borderRadius: '2px',
      transition: '.2s cubic-bezier(0.455, 0.03, 0.515, 0.955)',
      baseColor: '#fff',
      subColor: '#222',
      accentColor: '#cb1b45'
    },
    // Alternate icon (HTML)
    // If it is null it will be Octicon's search.
    // default: null
    icon: null,
    // When you put it on the right, it stretches to the left,
    // If you place it on the left it will extend to the right.
    // default: 'right'
    iconPosition: 'right',
    onSubmit(searchText, form, reset) {
      console.log(arguments);
      // Empty the contents of `<input>` and store the form.
      reset();
    }
  }
});

Example

  • test/fixtures/index.js
  • example/webpack/index.js

LICENSE

The MIT License (MIT)

Copyright (c) 2017 nju33 nju33.ki@gmail.com