Brif UI logo
0.0.51

Codeblock

Used to highlight code syntax.

Default

1function MyComponent(props) {
2  const num = 100;
3  
4  // This is the comment
5  return (
6    <div> 
7      <h1 className="bold">Hello, {props.name}!</h1>
8      <p>This is an example React component.</p>
9    </div>
10  );
11}

Highlighted lines

1function MyComponent(props) {
2  const num = 100;
3  
4  // This is the comment
5  return (
6    <div> 
7      <h1 className="bold">Hello, {props.name}!</h1>
8      <p>This is an example React component.</p>
9    </div>
10  );
11}

With filename

hello-world.tsx
1function MyComponent(props) {
2  const num = 100;
3  
4  // This is the comment
5  return (
6    <div> 
7      <h1 className="bold">Hello, {props.name}!</h1>
8      <p>This is an example React component.</p>
9    </div>
10  );
11}

API Reference

Root

React.ComponentPropsWithRef<div>

Header

React.ComponentPropsWithRef<div>
PropTypeDefault
filename
string_
icon
ReactNode_

Content

React.ComponentPropsWithRef<div>
PropTypeDefault
language
stringtypescript
hightlightLines
number[][]