{"id":46211,"library":"reflex-components-code","title":"Reflex Code Display Components","description":"A Reflex library for displaying code blocks with syntax highlighting, line numbers, and copy-to-clipboard functionality. Version 0.9.2, updated infrequently.","status":"active","version":"0.9.2","language":"python","source_language":"en","source_url":"https://github.com/KengoWada/reflex-components-code","tags":["reflex","code-display","syntax-highlighting","web-components"],"install":[{"cmd":"pip install reflex-components-code","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Runtime dependency; library provides code components for Reflex apps.","package":"reflex","optional":false}],"imports":[{"wrong":"from reflex_components_code import Code","symbol":"Code","correct":"import reflex_components_code"}],"quickstart":{"code":"import reflex as rx\nfrom reflex_components_code import Code\n\ndef index() -> rx.Component:\n    return Code(\n        code=\"print('Hello, World!')\",\n        language=\"python\",\n        show_line_numbers=True,\n        theme=\"dark\",\n    )\n\napp = rx.App()\napp.add_page(index)\n","lang":"python","description":"Minimal Reflex app that displays a code block using the Code component."},"warnings":[{"fix":"Pass code as a plain string: code='your code here'","message":"The 'Code' component's 'code' prop must be a string literal, not a ReactiveVar or expression. Using a local variable that is not a string may cause runtime errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Use only 'dark' or 'light' as of v0.9.2. Check docs for updated list.","message":"The 'theme' prop accepts specific string values (dark, light, etc.) but does not validate them at runtime. An invalid theme string will silently fall back to default.","severity":"gotcha","affected_versions":"all"},{"fix":"Pin reflex to version 0.4.0 or earlier if using rx.App and add_page. Use the library with caution on newer Reflex versions.","message":"Reflex itself has moved from page-based API to a different routing approach in recent versions. Ensure your Reflex version is compatible with this library's dependencies.","severity":"deprecated","affected_versions":">=0.9.0"}],"env_vars":null,"search_vec":"'0.9.2':24 'block':11 'clipboard':21 'code':2,10,29 'code-display':28 'compon':4,36 'copi':19 'copy-to-clipboard':18 'display':3,9,30 'function':22 'highlight':14,33 'infrequ':26 'librari':7 'line':15 'number':16 'reflex':1,6,27 'syntax':13,32 'syntax-highlight':31 'updat':25 'version':23 'web':35 'web-compon':34","created_at":"2026-06-07T12:58:49.049315+00:00","updated_at":"2026-06-07T12:58:49.049315+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}