npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aura-adaptive/aura-ui-adaptor

v2.0.0

Published

React library for ML-driven adaptive UI components based on JSON rules

Downloads

326

Readme

@aura-adaptive/aura-ui-adaptor

npm version License: MIT

@aura-adaptive/aura-ui-adaptor is a token-first React adaptive UI runtime and component library. It adapts UI presentation in real time from AURA profile data, exposes token-driven CSS variables and a-* utility classes, and keeps the optional adaptive component layer for teams that want ready-made primitives.

Features

  • ML-Driven Personalization: Automatically adapts UI components using profiles from the AURA browser extension.
  • Extensive Component Library: Offers a wide range of adaptive primitives (Buttons, Cards, Inputs, Tables, Dialogs, etc.).
  • Accessibility First: Applies adaptive design tokens for typography, spacing, contrast, motion, layout, and interaction comfort.
  • Behavior-Aware Adaptation: Uses lightweight runtime interaction signals such as click rate, scroll speed, and interaction timing to support adaptive UI refinement.
  • Token-Driven Utility Classes: Injects optional a-* utility classes such as a-card, a-readable, and a-action-primary.
  • Adaptive CSS Variables: Updates :root variables whenever the active ML profile changes.
  • Seamless Integration: Easy-to-use AdaptiveProvider and hooks for effortless adoption in existing React applications.
  • Fallback Mechanism: Built-in prediction models ensure a graceful fallback when the extension is not available.

Installation

Install the package via npm:

npm install @aura-adaptive/aura-ui-adaptor

Or using yarn:

yarn add @aura-adaptive/aura-ui-adaptor

Or using pnpm:

pnpm add @aura-adaptive/aura-ui-adaptor

Note: This package requires react and react-dom (v18 or v19) as peer dependencies.

Quick Start

Wrap your application's root with the AdaptiveProvider and start using the adaptive components.

import React from 'react';
import {
  AdaptiveProvider,
  AdaptiveButton,
  AdaptiveText,
  AdaptiveProfileInspector,
} from "@aura-adaptive/aura-ui-adaptor";

export function App() {
  return (
    <AdaptiveProvider>
      <main className="a-page">
        <section className="a-card a-stack">
        <AdaptiveText variant="h1">Welcome to AURA</AdaptiveText>
        <AdaptiveText variant="body">
          Experience a dynamically adapting user interface.
        </AdaptiveText>
        <AdaptiveButton variant="primary" onClick={() => alert('Clicked!')}>
          Get Started
        </AdaptiveButton>
        </section>
      </main>
    </AdaptiveProvider>
  );
}

No CSS import is required. AdaptiveProvider injects the AURA utility classes once and updates the adaptive CSS variables whenever tokens change.

AURA Utility Classes

The utility layer is intentionally small and AURA-specific. Classes describe adaptive UI intent rather than fixed visual values:

  • a-page, a-section, a-stack, a-cluster, a-flow, a-grid-adaptive
  • a-readable, a-heading, a-subheading, a-caption, a-muted, a-emphasis
  • a-surface, a-panel, a-card, a-divider, a-border-adaptive
  • a-action-primary, a-action-secondary, a-action-quiet, a-control, a-input
  • a-touch-target, a-focus-ring, a-alert, a-alert-success, a-alert-warning, a-alert-danger
  • a-assistive, a-tooltip-target, a-interactive

The class names remain stable. Their behavior changes through AURA CSS variables derived from the active ML profile.

Example:

<button className="a-action-primary a-focus-ring">
  Save changes
</button>

When AURA updates font_size, target_size, contrast_mode, reduced_motion, or spacing values, the button updates automatically.

CSS Variables

AdaptiveProvider writes variables such as:

--aura-color-background
--aura-color-surface
--aura-color-text
--aura-color-primary
--aura-color-on-primary
--aura-font-size-body
--aura-font-size-heading
--aura-line-height
--aura-spacing-gap-x
--aura-spacing-gap-y
--aura-spacing-pad-x
--aura-spacing-pad-y
--aura-control-min-target-size
--aura-motion-duration

You can use them in your own CSS too:

.checkout-summary {
  background: var(--aura-color-surface);
  color: var(--aura-color-text);
  padding: var(--aura-spacing-pad-y) var(--aura-spacing-pad-x);
  font-size: var(--aura-font-size-body);
  line-height: var(--aura-line-height);
}

Privacy-Conscious Runtime Signals

@aura-adaptive/aura-ui-adaptor includes lightweight behavior-signal monitoring as part of its adaptive runtime, such as click patterns, scroll activity, interaction timing, viewport changes, and adaptation-related events. These signals are used to improve interface personalization and adaptation quality, not to capture private user content. The package is designed to avoid collecting passwords, form input values, or raw user-entered text. Developers should ensure that their application-level privacy notice accurately reflects the use of adaptive interaction signals where required.

Optional Profile Inspector

Render <AdaptiveProfileInspector /> anywhere inside AdaptiveProvider to add a draggable floating AURA button. Clicking it opens a read-only inspector panel that shows:

  • user/runtime state
  • extension availability and login status
  • extension storage profiles for personalized, adaptive, and final selection
  • the live profile currently applied by AdaptiveProvider
  • differences between the final extension profile and the applied runtime profile
  • fallback/runtime details when the extension path is unavailable

This inspector is a separate module. AdaptiveProvider does not mount it automatically and its existing behavior is unchanged when the inspector is not rendered.

API Reference

UI Components

| Layout & Containers | Forms & Inputs | Feedback & Navigation | Typography & Media | |---------------------|----------------|-----------------------|--------------------| | AdaptiveCard | AdaptiveInput | AdaptiveAlert | AdaptiveText | | AdaptiveGrid | AdaptiveSelect | AdaptiveDialog | AdaptiveImageFilter | | AdaptiveDrawer | AdaptiveSwitch | AdaptiveTooltip | | | AdaptiveList | AdaptiveCheckbox | AdaptiveMenu | | | AdaptiveTable | AdaptiveTextarea | AdaptiveNavbar | | | AdaptiveDropdown | AdaptiveButton | AdaptivePagination | |

Contributing

We welcome contributions! Please feel free to submit a Pull Request or open an issue if you have suggestions or find bugs.

To build the project locally:

npm install
npm run build

License

MIT