devto 2026-07-07 원문 보기 ↗
Rattribute.js allows you to define different HTML attributes for different viewport widths using simple data-* attributes. Whether you need to change classes, targets, ARIA attributes, or any other HTML attribute, Rattribute.js updates your elements automatically as the browser size changes — without writing responsive JavaScript.
This is a brand new project that I started a few days ago!
❓ Rattribute.js allows you to define different HTML attributes for different viewport widths using simple data-* attributes. Whether you need to change classes, targets, ARIA attributes, or any other HTML attribute, Rattribute.js updates your elements automatically as the browser size changes — without writing responsive JavaScript.
v1.3.1
xs–xxl), plus custom sizes.Rattribute.js works in all modern browsers, including:
To see a list of all the most recent changes, click here.
You…