Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aidenybai/dababy

:trollface: Data binding so simple even DaBaby could do it!
https://github.com/aidenybai/dababy

alpine dababy dom javascript lucia ui vue

Last synced: about 1 month ago
JSON representation

:trollface: Data binding so simple even DaBaby could do it!

Awesome Lists containing this project

README

        

# 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](https://github.com/aidenybai/lucia)

## Installation

Put this script tag between the `` tags of your webpage.

```html

```

## Dababy Quote Generator Example

```html




```

## 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:**

```html




```

### 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:**

```html




```

### 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.`

**Example:**

```html


: turned into a convertable




```

---

© 2021 Aiden Bai