# Microinteractions API

Every page has a read-only Markdown version with the study notes and full source code. No authentication required.

## Content negotiation

Request any page with `Accept: text/markdown` to get Markdown instead of HTML.

```
curl -H 'Accept: text/markdown' https://microinteractions.dev/
```

## Fixed URLs

- `https://microinteractions.dev/markdown/index.md` — collection index
- `https://microinteractions.dev/markdown/text-swap.md` — Text swap button
- `https://microinteractions.dev/markdown/hold-confirm.md` — Hold to confirm button
- `https://microinteractions.dev/markdown/chevron-morph.md` — Chevron morph buttons
- `https://microinteractions.dev/markdown/plucked-underline.md` — Plucked underline
- `https://microinteractions.dev/markdown/tab-indicator.md` — Tab indicator
- `https://microinteractions.dev/markdown/worm-dots.md` — Worm dots
- `https://microinteractions.dev/markdown/tick-rail.md` — Tick rail
- `https://microinteractions.dev/markdown/gooey-radio-group.md` — Gooey radio group
- `https://microinteractions.dev/markdown/aligned-select.md` — Aligned select
- `https://microinteractions.dev/markdown/edge-aware-tooltip.md` — Edge-aware tooltip
- `https://microinteractions.dev/markdown/faq-panel.md` — FAQ panel
- `https://microinteractions.dev/markdown/drag-select.md` — Drag to select
- `https://microinteractions.dev/markdown/resize-handle.md` — Resize handle
- `https://microinteractions.dev/markdown/drag-reorder.md` — Drag to reorder

## React components

The [shadcn registry index](https://microinteractions.dev/r/registry.json) lists the installable React components. Each study's Markdown includes its install command when a React port is available. The CLI installs the component and any required custom-element script, using your project's shadcn theme tokens. To install by name, add `"@microinteractions": "https://microinteractions.dev/r/{name}.json"` to `registries` in `components.json`, then run `npx shadcn@latest add @microinteractions/{name}`.

## Agent skill

`npx skills@latest add https://microinteractions.dev` installs a skill that tells a coding agent how to find, install, adapt, and review a study.

## In-browser tools (WebMCP)

Every page registers these tools with `document.modelContext` for agents running in the browser:

- `list_studies` — every study with category, trigger, duration, easing, and URLs
- `get_study` — `{ id }`; the study as Markdown, including source
- `open_study` — `{ id }`; navigates the tab to the live demo

## Machine-readable

- OpenAPI description: https://microinteractions.dev/openapi.json
- API catalog (RFC 9727): https://microinteractions.dev/.well-known/api-catalog
- Agent skill index: https://microinteractions.dev/.well-known/agent-skills/index.json
- llms.txt: https://microinteractions.dev/llms.txt
