Skip to content
mdxcn is now part of Shadcn Labs. details

chat

Chat

A conversation. Write `- you: …` and `- agent: …` lines. Your turns get a prompt glyph, italic turns are asides, and back-to-back lines from one speaker share a label. For a single remark, use Quote.

use it
Good for an agent session, a support thread, or an interview excerpt.
instead
One line someone said is Quote. Commands and output are Terminal.

session

`speaker: message`. The first speaker is you and gets the prompt. An italic turn is an aside. A repeated speaker is not repeated.

[ SESSION ]
  1. you
    which graph shows a rollback?
  2. agent
    Timeline. Bold the row where you rolled back.
  3. agent
    reads graph-timeline.tsx
  4. agent
    Then Diff for what the rollback changed.
  5. you
    and on GitHub?
  6. agent
    Paste the fenced ASCII. GitHub does not run MDX.
<Chat title="SESSION">

- you: which graph shows a rollback?
- agent: Timeline. Bold the row where you rolled back.
- agent: *reads graph-timeline.tsx*
- agent: Then Diff for what the rollback changed.
- you: and on GitHub?
- agent: Paste the fenced ASCII. GitHub does not run MDX.

</Chat>

install

command

support thread

you picks the asker. Leave a blank line between turns and a turn can hold paragraphs and code.

[ SUPPORT ]
  1. priya
    the timeline renders empty in our docs
  2. jon
    Do you swap li in mdx-components?

    Wrap the map in withMdxcn and the graphs see list items again.

  3. priya
    that was it
<Chat title="SUPPORT" you="priya">

- priya: the timeline renders empty in our docs

- jon: Do you swap `li` in mdx-components?

  Wrap the map in `withMdxcn` and the graphs see list items again.

- priya: that was it

</Chat>
[ PROPS ]
PropTypeDefaultDescription
titlestring"chat"Caption drawn on the top edge of the frame.
youstring—The person asking. Defaults to the first speaker.
promptstring">"The glyph on your turns.
childrenMarkdown—A list of `speaker: message` items. Loose items can hold paragraphs and code.
turns{ by, children?, aside? }[]—Data form.
palette"mono" | "duo" | "multi""mono"mono is one accent plus muted. duo paints the second series with --graph-accent-2. multi cycles three accents.
cornerstring"+"Character at each corner of the frame.
frame"box" | "corners" | "rule" | "none""box"box draws the dashed border. corners keeps only the corner marks. rule draws dashed lines above and below. none drops the border and padding, and puts the title above the content.
classNamestring—Passed to the outer frame.