Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,10 @@ a `maxLines` attribute after the language identifier. The
`maxLines` attribute should be a number representing the maximum
number of lines to display. By default, the code block will display up to 20 lines.

When you use `maxLines`, an expand button automatically appears on hover in the top-right corner, allowing users to view the full code content in an expanded overlay that displays over the page.

<Tabs>
<Tab title="Example">
<Tab title="Example: maxLines=10">
```python maxLines=10
def is_prime(num):
"""Check if a number is prime."""
Expand Down Expand Up @@ -182,6 +184,15 @@ number of lines to display. By default, the code block will display up to 20 lin
</Tab>
</Tabs>

To hide the expand button or add custom styling, target the `.fern-expand-button` selector:

```css
/* Hide the expand button */
.fern-expand-button {
display: none;
}
```

## Wrap overflow

By default, long lines that exceed the width of the code block become scrollable:
Expand Down