Docs
Code Block

Code Block

An image element with a text fallback for profile images.

def main():
  print('hello brudi!') 
if __name__ == '__main__':
  main()
def main():
  print('hello brudi!') 
if __name__ == '__main__':
  main()
func main() {
  fmt.Println("Hello brudi!")
  os.Exit(0)
}
func main() {
  fmt.Println("Hello brudi!")
  os.Exit(0)
}

Installation

npm install @brudi/react-code-block
npm install @brudi/react-code-block

Customization

npx @brudi/ui extend avatar
npx @brudi/ui extend avatar

Usage

import { CodeBlock } from '@brudi/react-code-block'
import { CodeBlock } from '@brudi/react-code-block'
<Avatar src="https://i.pravatar.cc/150?u=AX" fallback="AX" />
<Avatar src="https://i.pravatar.cc/150?u=AX" fallback="AX" />

Examples

With Options

linenumbers
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
1234function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
highlight
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
filename
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
main.go
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
heading
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
Custom Heading
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
clipboard
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
chrome
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}
function hello() {
  console.log('hello brudi!')
  process.exit(0)
}

With Tabs

function hello() {
  console.log('hello First!')
  process.exit(0)
}
function hello() {
  console.log('hello First!')
  process.exit(0)
}
def main():
  print('hello First!') 
if __name__ == '__main__':
  main()
def main():
  print('hello First!') 
if __name__ == '__main__':
  main()
func main() {
  fmt.Println("Hello First!")
  os.Exit(0)
}
func main() {
  fmt.Println("Hello First!")
  os.Exit(0)
}
function hello() {
  console.log('hello Second!')
  process.exit(0)
}
function hello() {
  console.log('hello Second!')
  process.exit(0)
}
def main():
  print('hello Second!') 
if __name__ == '__main__':
  main()
def main():
  print('hello Second!') 
if __name__ == '__main__':
  main()
func main() {
  fmt.Println("Hello Second!")
  os.Exit(0)
}
func main() {
  fmt.Println("Hello Second!")
  os.Exit(0)
}