Skip to content

Latest commit

Β 

History

History
50 lines (38 loc) Β· 1.31 KB

README.md

File metadata and controls

50 lines (38 loc) Β· 1.31 KB

Ecto Library πŸš€

Ecto is a lightweight JavaScript library that provides dynamic variable binding and condition-based rendering without requiring users to write JavaScript! 🎯

πŸ“Œ Features

  • 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.

πŸ“₯ Installation

You can include Ecto in your project using jsDelivr CDN:

<script src="https://cdn.jsdelivr.net/gh/HaSh3003/Ecto_Library/ecto.min.js"></script>

πŸš€ Usage

1️⃣ Define a Variable

<x-var name="userName" value="John Doe"></x-var>

2️⃣ Use Loops

<x-loop repeat="10">
  <x-click action="alert('hmed')">btn</x-click>
</x-loop>

3️⃣ Conditional Rendering

<x-var name="role" value="admin"></x-var>
<div if="{{role}} == 'admin'">Welcome, Admin! πŸ‘‘</div>

4️⃣ Using Components

<x-component src="header.html"></x-component>

πŸ’‘ Contributing

Want to improve Ecto Library? Feel free to fork, submit issues, or contribute! πŸŽ‰

πŸ“œ License

This project is open-source and available under the MIT License.


⭐ Star the repo if you like it! ⭐