@odopod/odo-responsive-attributes

Parse data attributes with respect to their breakpoints.

Usage no npm install needed!

<script type="module">
  import odopodOdoResponsiveAttributes from 'https://cdn.skypack.dev/@odopod/odo-responsive-attributes';
</script>

README

Odo Responsive Attributes

Parse data attributes with respect to their breakpoints.

Install

npm install @odopod/odo-responsive-attributes --save

Quick Start

import OdoResponsiveAttributes from '@odopod/odo-responsive-attributes';

clamper = new OdoResponsiveAttributes(document.getElementById('clamper'));
console.log(clamper.values); // Object with `xs`, `sm`, `md`, and `lg` keys.
console.log(clamper.currentValue); // Value based on the current breakpoint.

Documentation

Visit the Odo component directory for demos, code examples, and documentation.