All Projects → aidenybai → dababy

aidenybai / dababy

Licence: MIT License
Data binding so simple even DaBaby could do it!

Programming Languages

typescript
32286 projects
shell
77523 projects

Projects that are alternatives of or similar to dababy

Awesome
🚀A curated list of awesome resources related to Alpine.
Stars: ✭ 502 (+1759.26%)
Mutual labels:  dom, alpine
Lucia
🙋‍♀️ 3kb library for tiny web apps
Stars: ✭ 439 (+1525.93%)
Mutual labels:  dom, alpine
Prakma
Prakma is a framework to make applications using JSX, focusing on writing functional components.
Stars: ✭ 16 (-40.74%)
Mutual labels:  dom
replace-jquery
Automatically finds jQuery methods from existing projects and generates vanilla js alternatives.
Stars: ✭ 1,101 (+3977.78%)
Mutual labels:  dom
docker-mysql-cron-backup
Docker image to backup all your databases periodically
Stars: ✭ 144 (+433.33%)
Mutual labels:  alpine
SyntaxNet-Tensorflow
Minimal Tensorflow Docker image with SyntaxNet/DRAGNN based on Alpine linux
Stars: ✭ 35 (+29.63%)
Mutual labels:  alpine
docker-formio-api
Docker Form.io Server based on Debian w/s6 init, Zabbix Monitoring
Stars: ✭ 14 (-48.15%)
Mutual labels:  alpine
notes
Notas sobre JavaScript Full Stack
Stars: ✭ 70 (+159.26%)
Mutual labels:  dom
rails5-docker-alpine
Lightweight Docker development environment for Rails using Alpine Linux
Stars: ✭ 71 (+162.96%)
Mutual labels:  alpine
pablopunk.com
Blazing fast personal website with Jamstack
Stars: ✭ 16 (-40.74%)
Mutual labels:  dom
lish
Javascript Selection Object Library
Stars: ✭ 14 (-48.15%)
Mutual labels:  dom
dom-navigator
⚓️ JS library that allow keyboard navigation through DOM elements (←↑→↓).
Stars: ✭ 36 (+33.33%)
Mutual labels:  dom
spring-boot-docker
Lightweight Spring Boot Docker image based on Alpine + Docker Compose file
Stars: ✭ 25 (-7.41%)
Mutual labels:  alpine
preact-delegate
Preact delegate DOM events
Stars: ✭ 17 (-37.04%)
Mutual labels:  dom
scrollparent.js
A function to get the scrolling parent of an html element.
Stars: ✭ 51 (+88.89%)
Mutual labels:  dom
svgdom
Library to represent an SVG as a DOM.
Stars: ✭ 30 (+11.11%)
Mutual labels:  dom
docker-jitsi-meet
Docker Jitsi Meet WebRTC conferencing system w/Prosody XMPP and s6 overlay
Stars: ✭ 66 (+144.44%)
Mutual labels:  alpine
xmlresolver
The xmlresolver project provides an advanced implementation of the SAX EntityResolver (and extended EntityResolver2), the Transformer URIResolver, the DOM LSResourceResolver, the StAX XMLResolver, and a new NamespaceResolver. It uses the OASIS XML Catalogs V1.1 Standard to provide a mapping from external identifiers and URIs to local resources.
Stars: ✭ 31 (+14.81%)
Mutual labels:  dom
wordpress-php
PHP docker container image for WordPress
Stars: ✭ 24 (-11.11%)
Mutual labels:  alpine
php7-alpine
Docker container for PHP 7 in Alpine Linux, with almost all extensions that you may need
Stars: ✭ 20 (-25.93%)
Mutual labels:  alpine

Dababy

Data binding so simple even DaBaby could do it!

Note: This name was just made off of a whim, not aimed at offending anyone. If you're looking for something a bit more comprehensive, but not to the level of Vue or Angular, check out Lucia

Installation

Put this script tag between the <head> tags of your webpage.

<script src="https://unpkg.com/dababy"></script>

Dababy Quote Generator Example

<div data="{ quotes: ['LES GO', 'LESS GO', 'LESSS GO'] }">
  <button ref="quote" bind="{
    onclick: () => {
      const quote = quotes[Math.floor(Math.random() * quotes.length)];
      refs.quote.innerHTML = quote;
    }
  }"><button>
</div>

Features

Data

Add the data attribute to an element to get started. The value of the attribute should be an object literal. Anything under that element will be able to access the data as global variables when binding.

Example:

<div data="{ name: 'Dababy' }">
  <!-- content here -->
</div>

Bind

Add the bind attribute to an element to bind properties, basically anything you can access in JavaScript like innerHTML, onclick, style, id, etc. This will attach it to the element

Example:

<div data="{ name: 'Dababy' }">
  <p bind="{ innerHTML: name }"><!-- Dababy --></p>
</div>

Refs

Add the ref attribute to create markers that act like shorthands for document.querySelector. Attach it to an element and name it in the attribute value, then access it later by doing refs.<name>

Example:

<div data="{ name: 'Dababy' }">
  <p ref="name">: turned into a convertable</p>
  <p bind="{ innerHTML: name + refs.name.innerHTML }"><!-- Dababy: turned into a convertable --></p>
</div>

© 2021 Aiden Bai

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].