Releases: eddiegulay/octopalm
Releases · eddiegulay/octopalm
ladybug
OctoPalm.js v2.0.0 - Ladybug
Release Date: 21 November 2024
What's New in v2.0.0 - Ladybug:
- Real-Time, Customizable Search: Improved search functionality with real-time results as users type, offering a smoother, faster user experience.
- Animated Results: Enhanced animations for smoother search result display and item interactions.
- Emoji Support: Added the ability to display emojis next to item names for a more engaging and visually appealing search experience.
- Duplicate Item Removal: Automatically removes duplicate items from the results to ensure that each item is displayed only once.
- Improved Scrollbars: Custom scrollbar styling for a more polished design.
- Better Item Filtering: Items are now organized by key, improving performance and efficiency when filtering results.
Installation:
You can use OctoPalm.js in two ways:
Via CDN
Include the following CDN link in your document <head>
:
<script src="https://aidalog.github.io/cdn/light/octopalm.ladybug.js"></script>
Download from GitHub
- Download the latest version from the [OctoPalm GitHub Repository](https://github.com/eddiegulay/octopalm).
- Include the
octopalm.js
file in your project:
<script src="/path/to/octopalm.ladybug.js"></script>
Usage:
1. Preparing Your HTML
Add an input element where users will type their search queries. For example:
<input type="text" id="search-input" placeholder="Search..." />
2. Initializing OctoPalm.js
Include the OctoPalm.js
script in your HTML and initialize it with your input ID and search items. Here's how:
<script src="/path/to/octopalm.js"></script>
<script>
// Example search items for a store
const items = [
{ itemName: "Toyota Camry", link: "/vehicles/toyota-camry", emoji: "🚗" },
{ itemName: "Honda Civic", link: "/vehicles/honda-civic"},
// Add more items as needed...
];
// Initialize OctoPalm with the search input ID and items
new OctoPalm('search-input', items);
</script>
3. Customizing Styles
OctoPalm.js injects default styles into your document. However, you can customize these styles by modifying the CSS in octopalm.js
or overriding them in your own stylesheet.
API
Constructor
new OctoPalm(inputId, items)
inputId
: The ID of the input element where users will type their search queries.items
: An array of search items, each with the propertiesitemName
(string),link
(string), and optionalemoji
(string).
Credits
OctoPalm.js was created and is maintained by [Eddie Gulay](https://github.com/eddiegulay). For support or contributions, please visit the [GitHub repository](https://github.com/eddiegulay/octopalm).