Skip to content

Accordion item title styling #980

Closed Answered by tcbegley
AtharvaKatre asked this question in Q&A
Discussion options

You must be logged in to vote

This is now possible with the latest version of dash-bootstrap-components

pip install -U dash-bootstrap-components
import dash_bootstrap_components as dbc
from dash import Dash, html

app = Dash(external_stylesheets=[dbc.themes.BOOTSTRAP])

app.layout = dbc.Container(
    dbc.Accordion(
        [
            dbc.AccordionItem(
                f"The content of accordion item {i}",
                title=[
                    html.Span(
                        "Collapsible group item",
                        style={"color": "blue", "fontWeight": 800},
                    ),
                    html.Span(f"#{i}", className="ms-1"),
                ],
            )
            for i in range(1

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by tcbegley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants