0.0.1 • Published 7 years ago

tuta v0.0.1

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

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: {
    defaultStyle: {
      // 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