#simple code test button properties to add images on button i would like some image instead of simple button in python, nothing image is added#
from dash import Dash, dcc, html, Input, Output, State
app = Dash(__name__)
app.layout = html.Div([
html.Div(dcc.Input(id='input-on-submit', type='text')),
html.Button(children=[html.Img(r'/home/Documents/web/b.jpeg')], id='submit-val', n_clicks=0),
html.Div(id='container-button-basic',
children='Enter a value and press submit')
])
@app.callback(
Output('container-button-basic', 'children'),
Input('submit-val', 'n_clicks'),
State('input-on-submit', 'value')
)
def update_output(n_clicks, value):
return 'The input value was "{}" and the button has been clicked {} times'.format(
value,
n_clicks
)
if __name__ == '__main__':
app.run_server(debug=True)