kirupa.com

06 / COMPONENTS / READING

Platform paths

The same step for Mac, Windows, and Linux, each a collapsible native details in one exclusive group. Choosing a platform opens it and closes the others, and every other group on the page opens the same platform.

Reading1 variantcomponent

Live preview

LOCAL PREVIEW

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

Notes

Use when one step has different commands per operating system, so each reader sees only their own. Every item in a group shares one name (exclusive open), and every group on the page uses the same data-platform values (mac, windows, linux), because kirupa.js opens the matching platform in the page's other groups once a reader picks one. All items start closed, open with a click, tap, Enter, or Space with no JavaScript, and keep their text in the HTML, so search, find-in-page, and the Markdown and plain-text twins (which list every platform expanded) see it. Introduce the group with a sentence ending in a colon. Inside a body, introduce each code block with a sentence ending in a colon and never follow a code block with a list. Keep shared results and commentary outside the group. Say plainly which paths you ran yourself and which follow the vendor's docs.

Usage

Platform paths

Example composed with native selectors / Rendered markup
<p>A sentence introducing the choice, ending in a colon:</p>
<div class="platformPaths" role="group" aria-label="Training steps for your computer">
  <details class="platformPaths__item" name="platform-train" data-platform="mac" style="--icon: url('https://www.kirupa.com/icon/1f34e.svg#red-apple');">
    <summary class="platformPaths__choice">Mac with Apple silicon</summary>
    <div class="platformPaths__body">
      <p>What to do, ending in a colon:</p>
      <pre><code class="language-bash">...</code></pre>
    </div>
  </details>
  <!-- windows (1fa9f window) and linux (1f427 penguin) items, same name -->
</div>

Anatomy

Selectors#mainContent .platformPaths#mainContent .platformPaths__choice#mainContent .platformPaths__body

Properties--linkForeground--bodyText--structureBorder

Sources

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.