New Component: st-card for displaying KPI metrics in your apps

Hi,

I just finished creating a card component for streamlit,
It also supports delta values and progress bars,

st-card demo

pip install st-card
from st_card import st_card
st_card('Completed Orders', value=76.4, show_progress=True)

Hoping to see some cool apps built with this

Thanks,
Akshansh

Open in Streamlit GitHub

15 Likes

Ah, this is so cool @akshanshkmr ! Thank you :grinning:
I’ll make sure to use it !

2 Likes

That’s a lovely and useful new component (another one! :raised_hands:)

Thanks for creating it and sharing it with the community, Akshansh! :pray:

Best,
Charly

2 Likes

Nice!

Could you add your component to the tracker :smiley: Streamlit Components - Community Tracker - Show the Community! - Streamlit ? So w don’t lose it in the forum?

Thanks, one day I should build a Discourse bot for this :rofl:

Fanilo

3 Likes

Haha :joy:
Sure

Awesome @akshanshkmr, the card looks really cool.

May I make a suggestion: is there a way to change the card’s background colour?

Thank you for this lovely component.

1 Like

Hi @Shawn_Pereira

I made the background colour dependent on the app theme, but surely i can add an argument for it in the next version.

Thanks for the suggestion,
Akshansh

@akshanshkmr - Nice to see you having loads of fun Streamlitin’ :100: Great component.

Thanks,
Arvindra

2 Likes

Thank you for creating this ! Kudos

1 Like

Thanks @arky and welcome to the community🎈

Hello, can you make a serious tutorials to teach us to make streamlit component and publish them.
more simple will be more popular.
Thank you.

Hi,

Streamlit’s youtube channel has a great 2 part series on this very topic.

You can check it out.

Thanks,
Akshansh


BeyondMyself
活跃用户

1 分钟

I had saw that, it is not easy for me to understand that.
I hope we can have more simple tutorials.

Oh, okay

Maybe @Charly_Wargnier can pass on the feedback to the dev team.

Thanks,
Akshansh

how can we control the digits of decimal values? If I want to show a value of 2.1322, how can we do that?

Hi @Shikun_Chen,

This is not currently supported, I can implement it in the next version
Thanks for the suggestion

Akshansh

Hey @BeyondMyself you can also try https://streamlit-components-tutorial.netlify.app/ .
Maybe if we were to make a more specific components tutorial, what resonates with you and what needs more clarity for you in those tutorials?
Fanilo

1 Like

Thank you. I will learn it carefully.

Hey @akshanshkmr,

This component is something I have been waiting for a long time.
I once implemented something similar. The challenge is
to make it stackable with other streamlit components as well.
For example, could you include a ‘st.image()’ as a value?
Just a suggestion you could consider :slight_smile: .

EDIT:
I totally forgot to mention that return events from on_click on/in elements of the card would be
something wanted to!

Best regards
Chris

Thanks for the suggestions chris,
I’ll definitely experiment apong these lines

Thanks,
Akshansh