Black Lives Matter. Please consider donating to Campaign Zero's mission of ending police violence in America.
https://www.joincampaignzero.org

Has something changed with radio items orientation?

According to the example in the user guide, this should be vertically aligned, but its horizontally aligned. Anyone know if something has changed making the user guide out of date?

I think you can assume any styling in the documentation uses the Dash CSS file bWLwgP.css. Try this:

import dash
import dash_core_components as dcc
import dash_html_components as html

external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']

app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div(
    dcc.RadioItems(
        options=[
            {'label': 'New York City', 'value': 'NYC'},
            {'label': 'Montréal', 'value': 'MTL'},
            {'label': 'San Francisco', 'value': 'SF'}
        ],
        value='MTL'
    )
)

if __name__ == '__main__':
    app.run_server()
1 Like

Thanks I was able to fix it merging that css file copy and pasted into the bootswatch css file i’m using.