using-streamlit-markdown

Format rich text and Markdown elements in Streamlit applications.

629|85|Updated May 4, 2020
One-click install
npx skills add https://github.com/andfanilo/streamlit-echarts --skill using-streamlit-markdown-andfanilo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: using-streamlit-markdown
Source: https://github.com/andfanilo/streamlit-echarts/tree/main/.claude/skills/developing-with-streamlit/skills/using-streamlit-markdown
Command: npx skills add https://github.com/andfanilo/streamlit-echarts --skill using-streamlit-markdown-andfanilo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlit text often needs rich formatting, but developers must remember which Markdown features are supported where and how Streamlit extends Markdown with colors, badges, icons, and LaTeX. This guide helps you avoid formatting surprises and craft labels, tooltips, tables, and content that render correctly across Streamlit elements.

Core Features & Use Cases

  • Markdown scope mapping: Clarifies which Streamlit functions support full Markdown, which accept only an inline label subset, and which do not support Markdown.
  • Streamlit-specific extensions: Demonstrates colored text, colored backgrounds, badges, Material icons, emojis, small text, and LaTeX math usage across the platform.
  • Practical examples: Shows how to combine features for dashboards, widget labels, table cells, and tooltips while safely escaping special characters.
  • Use case: Enhance an analytics dashboard by adding colored status badges, material icons for navigation tabs, and inline LaTeX in metric labels.

Quick Start

Use st.markdown and label-aware text to add colored badges, Material icons, and inline LaTeX to your Streamlit labels and content.

Frequently Asked Questions about using-streamlit-markdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add colored text and badges in Streamlit?

Add colored text and badges in Streamlit by using st.markdown with Streamlit-specific Markdown extensions. You can apply colored text, colored backgrounds, and badge styling to compose richly formatted UI labels and dashboard content.

Does Streamlit support LaTeX math and Material icons in st.markdown?

Streamlit supports LaTeX math and Material icons in st.markdown. You can render inline LaTeX equations and display Material icons alongside emojis to enhance navigation tabs and metric labels within your applications.

Which Streamlit widgets support Markdown formatting in their labels?

Streamlit widgets vary in Markdown support, with some accepting full Markdown while others only accept an inline label subset. Mapping this scope clarifies which functions render colored text, badges, and LaTeX correctly.

What is the best way to format tables and tooltips in Streamlit?

Format tables and tooltips in Streamlit by combining st.markdown with GitHub-flavored Markdown and Streamlit extensions. Safely escape special characters to ensure badges, Material icons, and small text render correctly across UI elements.

Why is my Markdown not rendering correctly in Streamlit?

Markdown may not render correctly in Streamlit if you use unsupported features in label-only widgets or fail to escape special characters. Check the Markdown scope mapping to ensure you use supported extensions like colored text and badges.

Can I use GitHub-flavored Markdown extensions in Streamlit applications?

You can use GitHub-flavored Markdown extensions in Streamlit applications. The platform supports standard GitHub-flavored Markdown alongside Streamlit-specific extensions for colored text, badges, Material icons, emojis, and LaTeX math.