kirupa.com

06 / COMPONENTS

Components

Native interface elements with independent theme previews, markup, selectors, and source references.

Agent Instructions / components

You are composing a current-shell KIRUPA page. Read /design/components.json and the relevant entry in /design/sections/components.md for selectors, variants, source files, and usage. Start from an adjacent working page and reuse its SSI structure and named component classes. When a link needs to look like a link inside the tutorial body, add the blueEmphasis class to its anchor, including in component examples. Style class names, IDs, and code identifiers in explanatory prose with inlineCode. Choose semantic HTML before adding JavaScript. Use visible labels, keyboard-operable controls, clear focus, and explicit loading/error/empty states. Keep forms inert in documentation specimens and label demo output. Preserve the article's reading rhythm and code overflow containment. Verify the component in each visual style and both modes. Do not initialize onboarding, tracking, a live chat request, or a subscription in a preview. Keep reference and navigation descriptions short and factual. Follow WCAG 2.2 AA for new or changed content: semantic HTML, keyboard access, visible focus, readable contrast in every theme, text alternatives, labeled controls, and explicit errors. Support zoom/reflow, respect reduced motion, and keep sound optional. Read /design/sections/accessibility.md for acceptance checks. Report unresolved barriers; automated checks alone do not establish conformance.

Current articles use #mainBody, #mainContent, #tutorialInformation, .authorText, .tutorialInfo, and the shared shell includes. Reuse .kirupaButton, .kirupaInput, .inlineCode, .blueEmphasis, .callout, .articleList, .smileysTable, and .embed-container instead of drawing near-duplicates.

Use .blueEmphasis on anchors that need the standard link treatment inside tutorial body content, including links in component examples. Keep their text descriptive. Use .inlineCode when naming CSS classes, IDs, or code identifiers in the explanation.

Example: Use the reading classes directly

Give the identifier its inline-code treatment and the destination its link treatment.

<p>Change <span class="inlineCode">count</span>, then
  <a class="blueEmphasis" href="/html5/building_your_first_web_page.htm">try the example</a>.
</p>

Use real buttons for actions, anchors for destinations, visible input labels, scope on table headers, and a caption or accessible name for tables. Focus is a state, not an optional decoration. Label disabled controls and empty states so readers understand what can happen next.

Buttons and form states

LOCAL PREVIEW

Activate this specimen to load its real styles. No saved preferences change.

Tutorial content has a title and byline, a reason to care, an example, and a clear progression. Code and illustrations must agree. Long examples can scroll inside their own container; the whole page must not become a sideways adventure. Here is a reading detail from Building Your First Interactive Web Page:

Reading patterns in a real tutorial

A passage from Building Your First Interactive Web Page, with code identifiers kept in the explanation.

pixel / light / Blue palette / Fixed capture, 2026-10-19.

The theme picker is a dialog with color swatches, a custom color, mode choices, and style cards. Onboarding is a separate once-only interaction that can record choices. These are production behaviors, not things to initialize when showing an innocent design preview.

The catalog below covers shared article patterns, navigation, book and newsletter promotions, theme controls, search, chat, media, and the visitor globe. Each entry identifies its implementation and any preview limitations. Tutorial-specific games and visualizers, legacy Flash interfaces, and third-party Discourse internals are outside this shared-component catalog. Preview actions stay local; they never submit a subscription, chat message, search query, or presence event to production.

For compact contextual popups, follow the Who's Online location dialog: a short heading, descriptive destination links, and an X close icon at the top-right, not a trailing Close text link. Use a real button with the accessible name Close and a 32px square target, inset 6px from the top and right. Reserve heading space so long labels cannot run beneath it. This is a contextual-choice pattern, not a replacement for modal confirmation or long forms.

The location popup uses a 280px-wide panel, 16px inner padding, a 2px --structureBorder outline, 12px corners, and a quiet 4px offset shadow. Reuse --pageBackground, --bodyText, --primary, and --serifFonts so it follows all nine styles and light/dark modes. Anchor it beside its trigger with an 8px gap; flip above when needed and keep at least 8px clear of viewport edges. Cap its height and scroll the panel rather than overflowing the page.

Use a button trigger with aria-haspopup="dialog", aria-controls, and synchronized aria-expanded; name the non-modal dialog with its heading. Move focus to the first link on open. Escape or the close icon returns focus to the trigger; outside click or focus dismisses without stealing focus. Tab and Shift+Tab can leave without a focus trap. Preserve the active interaction across live refreshes and dismiss safely if its source disappears. Reuse .clay-location-popover and .clay-location-close as the source reference; do not copy private visitor data into a specimen.

  • Do keep labels short, specific, and verb-led: Play, Stop, Download, Copy instructions.
  • Do distinguish loading, empty, success, and error states in text, not color alone.
  • Do put a labeled close-icon button at the top-right of compact contextual popups, with space for the heading and a visible focus ring.
  • Do not turn every paragraph into a card or use arbitrary decorative separators.

Current shared tutorial elements, homepage and podcast cards, promotions, navigation, theme controls, and signature widgets. Examples reuse native CSS and extracted source markup. Lesson-specific demos, legacy Flash layouts, and the forum's Discourse themes are not a shared component library. Download component metadata.

Reading

Promotions

Navigation

Widgets

Media

Reference

Source mapssi/newDesign/src/kirupa.cssssi/newDesign/src/header.shtmlssi/newDesign/src/onboarding.jsssi/newDesign/src/kirupa.jswhos-online/clay-globe.jswhos-online/clay-globe.css