Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion create/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ To denote a `word` or `phrase` as code, enclose it in backticks (`).

Use [fenced code blocks](https://www.markdownguide.org/extended-syntax/#fenced-code-blocks) by enclosing code in three backticks. Code blocks are copyable, and if you have the assistant enabled, users can ask the assistant to explain the code.

To style or hide the copy button, target the `code-block-copy-button` [element selector](/customize/custom-scripts#element-selectors) in custom CSS. For example, hide the copy button with `.code-block-copy-button { display: none; }`.

Specify the programming language for syntax highlighting and to enable meta options. Add any meta options, like a title or icon, after the language.

<CodeGroup>
Expand Down Expand Up @@ -309,7 +311,7 @@ sayHello();

### Expandable

Allow users to expand and collapse long code blocks using `expandable`.
Allow users to expand and collapse long code blocks using `expandable`. While collapsed, a fade overlay appears at the bottom of the code block. Style it by targeting the `code-block-fade-overlay` [element selector](/customize/custom-scripts#element-selectors) in custom CSS.

<CodeGroup>

Expand Down