Skip navigation

Behavior

Interactions / vanilla JS

artist.js progressively enhances native, readable HTML. It does not render components, manage application data, or require a library.

Load it once

<script src="/assets/js/artist.js" defer></script>

The script discovers component markup after the document is parsed. Copy the author HTML shown in these docs; do not copy enhanced clones, runtime state classes, or private --_* measurements from browser inspection.

Enhancement map

ComponentWithout JavaScriptWith Artist
Accordion / DropdownNative details/summary.Reversible motion; Dropdown adds outside-click and Escape dismissal.
NavbarLinks and nested native disclosures remain available.Mobile menu, drill-down, final-link dismissal, and floating visibility.
TabsEvery panel remains readable.One selected panel, roving keyboard focus, and restrained transitions.
ModalDialog content exists, but Artist open buttons do not act.Native dialog opening, animated dismissal, and focus containment.
Track / MarqueeNative scrolling or a static readable set.Item navigation or continuous, reduced-motion-aware proof lanes.
Scroll-Story / SelectorOriginal text-and-Figure pairs stay in reading order.Coordinated active media and narrative state.
Tooltip / feedback / formsNative title, validation, and visible messages.Positioned hints, dismiss motion, and invalid-state feedback.

What your application owns

Artist does not submit forms, fetch data, route pages, process payments, provide authentication, or decide what a button does. Those responsibilities remain with the application. Artist supplies documented presentation and interaction behavior for the HTML you provide.

Dynamic applications: there is no general mount/unmount API for arbitrary components inserted later by React, Framer, or another client renderer. Do not reload artist.js after every render. Plan that integration explicitly.

Accessibility and motion

Use real buttons, links, labels, headings, details/summary, and dialog. Artist preserves keyboard access and native fallbacks, and reduces or removes decorative movement when the user prefers reduced motion. Application logic still owns correct names, states, error messages, and focus decisions outside the documented components.