---
agent:
  instructions: "Search goop.so for Goop's components, templates, design skill, docs, pricing and terms. Ask in keywords or a plain question, such as \"date picker props\" or \"is the design skill free\"; the answer is the matching page sections in Markdown, each with its address."
  endpoint: "https://goop.so/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Inline code

A word or short phrase of code inside running text (a template word, a key, a path), in a small grey chip in the theme's mono, for React and Tailwind CSS. Part of Goop Pro.

Pro. Its export: `InlineCode`.

## Try it

Type your own code into the line and make it long enough to wrap.

Nothing runs: it is words in a sentence.

## When to use

- A word or short phrase of code inside running text (a template word, a key, a path), in a small grey chip in the theme's mono.

## Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Inline code on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.

```sh
npx shadcn@4.23.1 add https://registry.goop.so/g/<link>/meadow-inline-code.json --yes
```

```text
Add the Goop Inline code to this project. The install steps are at https://goop.so/docs/install.md
```

## Usage

```tsx
import { InlineCode } from '@/components/ui/goop/inline-code';

function SubjectHint() {
  return (
    <p className="text-lg text-foreground">
      Type <InlineCode>{'{{guest}}'}</InlineCode> in the subject to add each guest’s name.
    </p>
  );
}
```

- Fits: chat, record: body.
- width, padding, corner, background, text: add no class for these.

## API reference

### Options

- `asChild?: boolean = false` — Render the chip's look on the one child element instead of a `code`.

## Accessibility

- hover, focus-visible: the browser's own (:hover, :focus-visible): write nothing

## Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

## Related

- [Code block](/themes/meadow/components/code-block): A short value or command in the theme's mono, in a grey box, with a copy button beside it that copies it and says so.
- [Prose](/themes/meadow/components/prose): A block of running text set for reading, one paragraph or several, for a description, an article, a note or a help page.
- [Shortcut key](/themes/meadow/components/shortcut-key): One keyboard key drawn as a small bordered cap inline in hint text, naming a chord with its neighbours.
- [Meta facts](/themes/meadow/components/meta-facts): A strip of a record's short facts, such as its status, owner and dates, each a label over its value.
