☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Formatting button and tabs when using components() function

Community Support
paul_c
paul_c

Hi, I know I can format buttons and tags in a bokeh app, for example by having a styles.css file that looks like this:

.custom_button .bk-btn-group button {
    font-family: “Georgia”;
    font-size: 0.9vw;
    background: #104b1f;
    border: none;
}

And referencing that in the main.py file with:

Button(label="Download data", button_type="primary", aspect_ratio=1, css_classes=['custom_button'])

But how can I apply that same formatting if I want to output the file using:

script, div = components()

I’ve tried various ways, like including this in the python file, but haven’t found a solution.

css_classes = '''
<style>
.custom_button .bk-btn-group button {
    font-family: “Georgia”;
    font-size: 0.9vw;
    background: #104b1f;
    border: none;
}

 </style>'''

Thanks

⌁   Link to post

End of archived discussion · Replies are disabled