GitHub

CodeBlock

The CodeBlock component displays blocks of code.

Preview

            
                print('Hello, World!')
            
        

API Reference

proptypedefaultdescription
packagetyping.Literal['flect']flectNone
class_nametyping.Optional[str]NoneSpecifies the Tailwind CSS classes for the component.
text<class 'str'>NoneSpecifies the code text.
languagetyping.Optional[str]NoneDefines the programming language for syntax highlighting.
code_styletyping.Optional[str]NoneDetermines the code block's style.