Ecto is a lightweight JavaScript library that provides dynamic variable binding and condition-based rendering without requiring users to write JavaScript! π―
- Dynamic Variables: Use
<x-var>
to declare global variables. - Looping: Use
<x-loop>
to iterate over arrays. - Conditional Rendering: Use
if="{{variable}} == 'value'"
to show/hide elements. - Component System: Load external HTML components easily.
You can include Ecto in your project using jsDelivr CDN:
<script src="https://cdn.jsdelivr.net/gh/HaSh3003/Ecto_Library/ecto.min.js"></script>
<x-var name="userName" value="John Doe"></x-var>
<x-loop repeat="10">
<x-click action="alert('hmed')">btn</x-click>
</x-loop>
<x-var name="role" value="admin"></x-var>
<div if="{{role}} == 'admin'">Welcome, Admin! π</div>
<x-component src="header.html"></x-component>
Want to improve Ecto Library? Feel free to fork, submit issues, or contribute! π
This project is open-source and available under the MIT License.
β Star the repo if you like it! β