-
Notifications
You must be signed in to change notification settings - Fork 805
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Iconify lucide icons are loading when used directly:
mo.icon('lucide:leaf', color="red")
but not when used in mo.md:
mo.md(f"# {mo.icon('lucide:leaf', color='red')}")
and neither in mo.ui.button.
Screenshot:
Will you submit a PR?
- Yes
Environment
{
"marimo": "0.17.2",
"editable": false,
"location": "/home/user/PycharmProjects/MO_dev_1/.venv/lib/python3.12/site-packages/marimo",
"OS": "Linux",
"OS Version": "6.14.0-33-generic",
"Processor": "x86_64",
"Python Version": "3.12.3",
"Locale": "en_US",
"Binaries": {
"Browser": "--",
"Node": "v22.21.0"
},
"Dependencies": {
"click": "8.3.0",
"docutils": "0.22.2",
"itsdangerous": "2.2.0",
"jedi": "0.19.2",
"markdown": "3.9",
"narwhals": "2.9.0",
"packaging": "25.0",
"psutil": "7.1.1",
"pygments": "2.19.2",
"pymdown-extensions": "10.16.1",
"pyyaml": "6.0.3",
"starlette": "0.48.0",
"tomlkit": "0.13.3",
"typing-extensions": "4.15.0",
"uvicorn": "0.38.0",
"websockets": "15.0.1"
},
"Optional Dependencies": {
"loro": "1.8.2",
"pandas": "2.3.3"
},
"Experimental Flags": {}
}
Code to reproduce
import marimo
__generated_with = "0.17.2"
app = marimo.App(width="full")
@app.cell
def _(mo):
# works
mo.icon('lucide:leaf', color="red")
return
@app.cell
def _(mo):
# does not work
mo.md(f"# {mo.icon('lucide:leaf', color='red')}")
return
@app.cell
def _(mo):
btn = mo.ui.button(
label=f"{mo.icon('lucide:rocket')} Submit",
)
return (btn,)
@app.cell
def _(btn):
# not icon on button
btn
return
if __name__ == "__main__":
app.run()
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working