@rackai/classql

0.1.0 • Public • Published

ClassQL

DOM manipulation using document queries. Uses DOMQL API.

Installation

yarn add classql

Examples

Initialization:

import DOM from '@rackai/classql'

DOM.query({
  logo: { query: '.logo' }
})

Attributes:

DOM.query({
  modal: {
    query: '.modal',
    style: { display: 'none' }
  }
})

Events and update:

DOM.query({
  CTA: {
    query: '.button',
    on: {
      click: (event, element, node) => {
        DOM.find('modal').update({
          style: { display: 'block' }
        })
      }
    }
  }
})

Readme

Keywords

none

Package Sidebar

Install

npm i @rackai/classql

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

4.57 kB

Total Files

12

Last publish

Collaborators

  • nikoloza