Custom Components

Code Block - Focused Line

Enabling focused line in code blocks


Focused Line

Focused line is a way to show the line that you want to focus on, when you hover the code block it will remove the blur effect.

Code Example

Show focused line using the // [!code focus] identifier.

mdx
```bash showLineNumbers
console.log("not Focused")
// [!code focus]
console.log("hover me")
console.log("not Focused")
```

It will show like this

ts
console.log("not Focused")
console.log("hover me")
console.log("not Focused")