i am trying to incorporate the twitter new icon X in navbar, when i insert old icon, it appears, but when i incorporate new X icon, code runs but there is no output. code and output snippet is attahed.
Hello @Ahmad7886,
This might be because the new logo might not be included in the version of the cdn or whatever your app is loading. Update this and it will probably start showing up.
thanks, i have used bootstrap item-icon, i dont know from where its been loading, how to update the CDN, as i am new Dash User. sorry for my lack of knowledge.
here is the link of bootstrap icon https://icons.getbootstrap.com/icons/twitter-x/
HI @Ahmad7886 here an example how to include the bootstrap icons:
import dash
from dash import html
app = dash.Dash(
__name__,
external_stylesheets=[
# "https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css",
"https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.min.css"
]
)
app.layout = html.Div(
className='bi bi-twitter-x',
style={'fontSize': 80}
)
if __name__ == '__main__':
app.run_server(debug=True)
The source of the included css
:
1 Like
thank you for your help, as i was using dbc.icons.BOOTSTRAP in external stylesheet, after including the cdn css path, i it working fine. its working perfectly. once again thanks.
1 Like