InlineCode
A code fragment inside a paragraph. It renders as a <code> with the look of Code, but inline, and its size follows the surrounding text.
Helpers · TaishoDS Core, in plain HTML.
Examples
One working example per case. Each example is the HTML of its preview—copy it as is, and with Core’s CSS and JS loaded, it looks and works the same.
Command inside a sentence
Install it with npm i -D @taishods/core and you’re done.
When to use
- You’re naming a prop, a file, a value, or a command in the middle of a sentence.
- You want it to stand out from the text without interrupting the reading.
When not to use
- It’s a multi-line snippet →
code. - It’s a keyboard key →
kbd.
Do
- Use it for everything that’s written literally in code.
Don’t
- Don’t use it for emphasis. That’s what text emphasis is for.
TaishoDS Core
Doesn’t need JavaScript—it’s markup and CSS.
Purely presentational.
From the CDN, without a build, load taisho.inline-code.css along with taisho.base.css. That file is all you need.
For how Core works in general, see Behavior.
Accessibility
- Renders
<code>, the right semantics for a code fragment in the middle of a sentence.
Verification
What was actually tested. Anything that wasn’t tested says so—we’d rather say “not verified” than claim too much.
- axe WCAG 2.2 A + AA in a real browser, in light and dark mode, before every release.
- keyboard Adds no keys of its own—it uses the browser’s native behavior.
- screen reader Not verified with a screen reader. Test it in your own combination of components, not just here, where each one appears alone and on its happy path.