πΒ Β Tags
Submitted by Maggie Liu
Summary
Display tags like github issues!
Functions
tagger_component
Displays tags next to your text.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
content |
str
|
Content to be tagged |
required |
tags |
list
|
A list of tags to be displayed next to the content |
required |
color_name |
list[str] | str | None
|
A list or a string that indicates the color of tags. Choose from lightblue, orange, bluegreen, blue, violet, red, green, yellow |
None
|
text_color_name |
list[str] | str | None
|
A list or a string that indicates the text color of tags. |
None
|
Source code in src/streamlit_extras/tags/__init__.py
Import:
- You should add this to the top of your .py file
Examples
example
def example():
tagger_component("Here is a feature request", ["p2", "π©triaged", "backlog"])
tagger_component(
"Here are colored tags",
["turtle", "rabbit", "lion"],
color_name=["blue", "orange", "lightblue"],
)
tagger_component(
"Annotate the feature",
["hallucination"],
color_name=["blue"],
)