Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/knadh/floatype.js
A tiny, zero-dependency, floating autocomplete / autosuggestion widget for textareas.
https://github.com/knadh/floatype.js
autocomplete autosuggestion floating-widget suggestions textarea textarea-autocomplete type-ahead
Last synced: 11 days ago
JSON representation
A tiny, zero-dependency, floating autocomplete / autosuggestion widget for textareas.
- Host: GitHub
- URL: https://github.com/knadh/floatype.js
- Owner: knadh
- License: mit
- Created: 2023-11-25T17:46:48.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2024-08-26T08:12:47.000Z (2 months ago)
- Last Synced: 2024-10-26T13:13:32.465Z (13 days ago)
- Topics: autocomplete, autosuggestion, floating-widget, suggestions, textarea, textarea-autocomplete, type-ahead
- Language: JavaScript
- Homepage: https://knadh.github.io/floatype.js
- Size: 30.3 KB
- Stars: 87
- Watchers: 3
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# floatype.js
A super tiny Javascript autocomplete / autosuggestion library for rendering floating suggestion widgets in textareas. Zero dependencies and ~1200 bytes minified + gzipped.
[**View demo**](https://knadh.github.io/floatype.js)
![demo](https://github.com/knadh/floatype.js/assets/547147/d4525e83-da4d-46a1-8ebe-203d49ed0115)
## Usage
### Node
```shell
npm install @knadh/floatype
``````javascript
import { floatype } from @knadh/floatype;floatype(document.querySelector("textarea"), {
onQuery: async (val) => {
// fetch() or whatever that fetches/generates results.
return ["results", "here"];
}
});
```Check the [demo source](https://github.com/knadh/floatype.js/blob/master/docs/index.html) to see advanced usage and basic CSS styles.
### ES6 module
Check the [demo source](https://github.com/knadh/floatype.js/blob/master/docs/index.html) to use the lib in `` directly on an HTML page.> For dropdown suggestions on input boxes, see [autocomp.js](https://github.com/knadh/autocomp.js)
Licensed under the MIT License.