Skip to content

InlineCode

A word of code inside a sentence: a function, a flag, a file name.

import { InlineCode } from '@sypnia/ui/react'

On this page
  1. In a sentence
  2. When to use it
  3. For everyone

In a sentence

It keeps the machine face and wraps with the text.

Call db.from('orders') with the name of a table, then select() the columns you need.

Code
import { InlineCode } from '@sypnia/ui/react';

// A word of code inside a sentence: it keeps the machine face and never breaks the line of text.
export default function Sentence() {
  return <p>Call <InlineCode>db.from('orders')</InlineCode> with the name of a table, then <InlineCode>select()</InlineCode> the columns you need.</p>;
}

When to use it

Use it when

  • Text mentions something the person types or reads in code.

Do not use it when

  • It is a whole command: Snippet.
  • It is several lines: CodeBlock.

For everyone

  • It is a code element, so screen readers can tell it apart.
  1. In a sentence
  2. When to use it
  3. For everyone

    Search pages, sections and terms