Skip to content
v0.2.10

InlineCode

A small monospace code fragment that participates in running text.

Preview

Import @/ui/button in your project.

Use InlineCode

InlineCode is a named export of @flood-md/react. Connect the package once, then import what you use.

First time here? Connect Flood
Example import style
inline-code.tsxTSX
"use client";

import { FloodRoot, Text, InlineCode } from "@flood-md/react";
import "@flood-md/react/styles.css";

export function Example() {
  return (
    <FloodRoot>
      <Text as="p">Import <InlineCode>@/ui/button</InlineCode> in your project.</Text>
    </FloodRoot>
  );
}

Design notes

  • Native code semantics, bundled monospace stack and a quiet inline surface. Content is text; no HTML parsing or syntax highlighting is performed.
  • wrap defaults to true for long identifiers. wrap=false preserves the fragment on one line and the host must manage overflow. Use CodeSnippet for blocks of code and Kbd for keyboard input.
  • Compatible addition in 0.2.5. Uses existing Flood semantic tokens and relative geometry.

API reference

PropValuesDefault
size"sm" | "md" | "lg""md"
wrapbooleantrue
Native HTML propsHTMLAttributes<HTMLElement>Forwarded
View TypeScript source