How to use other people's react components in my dash app?

Let me help you. I just wrapped this Stars repo to dash-grocery.

It is unlikely that you can wrap components without having any knowledge of React at all. There are no shortcuts, and maybe it would be nice to spend some time learning about React.

pip install dash-grocery
import dash_grocery
from dash import Dash, html

app = Dash(__name__)

app.layout = html.Div(
    [
        dash_grocery.Stars(count=5, color2="red", size=150, char="❤", edit=True),
        dash_grocery.Stars(count=5, value=3, size=150, char="☻"),
        dash_grocery.Stars(count=5, size=150, edit=True),
    ]
)


if __name__ == "__main__":
    app.run(debug=True)

2 Likes