US

using-streamlit-markdown

Reference guide for using Markdown and Streamlit-specific formatting.

Install

mkdir -p .claude/skills/using-streamlit-markdown && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15205" && unzip -o skill.zip -d .claude/skills/using-streamlit-markdown && rm skill.zip

Installs to .claude/skills/using-streamlit-markdown

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Covers all Markdown features in Streamlit including GitHub-flavored syntax plus Streamlit extensions like colored text, badges, Material icons, and LaTeX. Use when formatting text, labels, tooltips, or any text-rendering element.
229 chars✓ has a “when” trigger
Beginner

Key capabilities

  • Format text with bold, italic, and strikethrough.
  • Include inline code and links.
  • Use Material icons and emojis.
  • Apply colored text, backgrounds, and badges.
  • Render LaTeX math inline or in display mode.
  • Embed images within Markdown.

How it works

Streamlit processes Markdown syntax, including GitHub-flavored Markdown and custom extensions, to render formatted text in various UI elements.

Inputs & outputs

You give it
Text, labels, tooltips, or any text-rendering element.
You get back
Formatted text with GitHub-flavored Markdown, Streamlit extensions like colored text, badges, Material icons, and LaTeX.

When to use using-streamlit-markdown

  • Formatting widget tooltips
  • Applying colors to text labels
  • Writing LaTeX in a UI

About this skill

Using Markdown in Streamlit

Streamlit supports Markdown throughout its API—in st.markdown(), widget labels, help tooltips, metrics, st.table() cells, and more. Beyond standard GitHub-flavored Markdown, Streamlit adds colored text, badges, icons, and LaTeX.

Quick reference

FeatureSyntaxExampleWorks in labels
Bold**text****Bold**
Italic*text**Italic*
Strikethrough~text~~Strikethrough~
Inline code`code``variable`
Code block```lang...``````python...```
Link[text](url)[Streamlit](https://streamlit.io)
Image![alt](path)![Logo](logo.png)
Heading# to ###### ## Section
Blockquote> text> Note
Horizontal rule------
Unordered list- item- First<br>- Second
Ordered list1. item1. First<br>2. Second
Task list- [ ] / - [x]- [x] Done<br>- [ ] Todo
Table| a | b || H1 | H2 |<br>|--|--|
EmojiDirect or shortcode🎉 or :tada:
Streamlit logo:streamlit::streamlit:
Material icon:material/icon_name::material/check_circle:
Colored text:color[text]:red[Error]
Colored background:color-background[text]:blue-background[Info]
Badge:color-badge[text]:green-badge[Success]
Small text:small[text]:small[footnote]
LaTeX (inline)$formula$$ax^2 + bx + c$
LaTeX (block)$$formula$$$$\int_0^1 x^2 dx$$

Where Markdown works

Markdown is supported in most places where text is rendered. Streamlit has three levels of markdown support:

Full Markdown — All syntax shown in the table above:

  • st.markdown(), st.write(), st.caption(), st.info(), st.warning(), st.error(), st.success(), st.table cells and headers, tooltips (help parameter)

Label subset — Inline formatting only (see table above). Block elements (e.g. headings, lists, tables) are silently stripped:

  • Widget and element labels (st.button, st.checkbox, st.radio, st.expander, st.page_link, etc.), st.radio and st.select_slider options, st.tabs names, st.metric label/value/delta, st.title, st.header, st.subheader, st.image caption, st.dialog title, st.progress, st.spinner.

No Markdown — Text displays literally:

  • st.text(), st.json(), st.dataframe() / st.data_editor() cells, st.selectbox / st.multiselect options, input placeholders, st.Page titles, chart/map labels

GitHub-flavored Markdown

Standard GFM syntax works as expected. Headings automatically get anchor links for navigation.

st.markdown("""
# Heading

**Bold**, *italic*, ~~strikethrough~~, `inline code`, [links](url)

- Unordered list
- [x] Task list

| Column | Column |
|--------|--------|
| Cell   | Cell   |

> Blockquote

```python
code_block = "with syntax highlighting"
```
""")

Colored text, backgrounds, and badges

st.markdown(":red[Error] and :green[Success]")  # Colored text
st.markdown(":blue-background[Highlighted]")     # Colored background
st.markdown(":green-badge[Active] :red-badge[Inactive]")  # Inline badges

Available colors: red, orange, yellow, green, blue, violet, gray/grey, rainbow, primary

Note: rainbow is not supported for backgrounds or badges. Standalone badges also available via st.badge().

Material icons

Use Google Material Symbols with :material/icon_name: syntax. Find icons at fonts.google.com/icons

st.markdown(":material/check_circle: Complete")

Material icons also work in icon parameters across many elements (st.button, st.expander, st.info, etc.).

Emojis

Both Unicode emojis (preferred) and shortcodes work.

st.markdown("Hello! 👋 :+1: :tada: :streamlit:")

Note: Material icons are preferred over emojis for a more professional look.

LaTeX math

Single $ for inline, double $$ for display mode. Inline math requires non-whitespace after $ to avoid conflicts with currency (e.g., "$5" won't be parsed as math).

# Inline math
st.markdown("The quadratic formula is $x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}$")

# Display math (centered, larger)
st.markdown("""
$$
\\sum_{i=1}^{n} x_i = x_1 + x_2 + ... + x_n
$$
""")

Images in Markdown

st.markdown("![Alt text](https://example.com/image.png)")
st.button("![Logo](app/static/logo.png) Click me")  # Image as icon in label

In labels, images display as icons with max height equal to font height.

Markdown in element labels

Widgets, containers, and other elements support Markdown in their labels (using the label subset).

st.radio(":material/palette: Choose **color**", [":red-background[Red]", ":blue-background[Blue]", ":green-background[Green]"])
tab1, tab2 = st.tabs([":material/home: Home", ":material/settings: Settings"])
st.metric(label=":material/attach_money: Revenue", value=":green[$1.2M]", delta=":material/trending_up: 12%")

Escaping special characters

Use backslash to show literal characters: \\[, \\*, 1\\.

st.markdown(":blue[Array: \\[1, 2, 3\\]]")
st.button("1\\. Not a list")

Markdown in st.table

st.table() renders Markdown in cells and headers.

st.table({
    "**Name**": "Alice",
    "**Status**": ":green-badge[Active]",
    "**Role**": ":material/shield: Admin"
})

Combining features

Mix multiple features for rich formatting.

st.markdown("""
### :material/rocket: Launch status

| Phase | Status | Notes |
|-------|--------|-------|
| Build | :green-badge[Complete] | All tests passing |
| Deploy | :orange-badge[In Progress] | ETA: 2 hours |
| Monitor | :gray-badge[Pending] | Waiting on deploy |

:small[Last updated: just now]
""")

st.markdown - text alignment and width

Control layout with text_alignment and width parameters.

st.markdown("Centered heading", text_alignment="center")  # left, center, right, justify
st.markdown("Content width only", width="content")  # stretch, content, or pixels (e.g. 400)

HTML (use very sparingly!)

Mix Markdown with HTML using unsafe_allow_html=True. For pure HTML without markdown processing, use st.html() instead.

st.markdown("**Status:** <span style='color: coral'>Custom styled</span>", unsafe_allow_html=True)
st.html("<div class='custom'>Pure HTML content</div>")

References

When not to use it

  • When text needs to display literally without Markdown processing.
  • When using `st.text()`, `st.json()`, `st.dataframe()`/`st.data_editor()` cells.
  • When using `st.selectbox`/`st.multiselect` options, input placeholders, `st.Page` titles, or chart/map labels.

Limitations

  • Block elements like headings, lists, and tables are silently stripped in label subsets.
  • Rainbow color is not supported for backgrounds or badges.
  • Inline math requires non-whitespace after `$` to avoid conflicts with currency.

How it compares

This skill extends standard Markdown with Streamlit-specific features like colored text, badges, Material icons, and LaTeX, providing richer formatting options than plain Markdown.

Compared to similar skills

using-streamlit-markdown side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
using-streamlit-markdown (this skill)03moNo flagsBeginner
devisland-markdown-rendering02moReviewIntermediate
resume-builder533moNo flagsBeginner
ml-paper-writing486moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

devisland-markdown-rendering

nangchang

Change DevIsland MarkdownView, agent message rendering, hook message formatting, diff rendering, attachment loading, heading handling, link/image safety, or tool output presentation. Use for MarkdownView, ToolMessageFormatter, Notch UI message displays, and related rendering tests.

00

resume-builder

amruthpillai

Generate professional resumes that conform to the Reactive Resume schema. Use when the user wants to create, build, or generate a resume through conversational AI, or asks about resume structure, sections, or content. This skill guides the agent to ask clarifying questions, avoid hallucination, and produce valid JSON output for https://rxresu.me.

53229

ml-paper-writing

davila7

Write publication-ready ML/AI papers for NeurIPS, ICML, ICLR, ACL, AAAI, COLM. Use when drafting papers from research repos, structuring arguments, verifying citations, or preparing camera-ready submissions. Includes LaTeX templates, reviewer guidelines, and citation verification workflows.

4897

docs-review

metabase

Review documentation changes for compliance with the Metabase writing style guide. Use when reviewing pull requests, files, or diffs containing documentation markdown files.

1085

claude-md-improver

anthropics

Audit and improve CLAUDE.md files in repositories. Use when user asks to check, audit, update, improve, or fix CLAUDE.md files. Scans for all CLAUDE.md files, evaluates quality against templates, outputs quality report, then makes targeted updates. Also use when the user mentions "CLAUDE.md maintenance" or "project memory optimization".

2167

book-translation

f

Translate "The Interactive Book of Prompting" chapters and UI strings to a new language

970

Search skills

Search the agent skills registry