I need some cards at the bottom of my dashboard after all my graphs, but it seems to crash the whole dash site when I try to change pages.
Can you share some of your code so we can take a look?
Also, some card examples can be found Here , perhaps you can utilize this code?
This is the function I made to make cards.
def make_card(head,icon):
card = [
dbc.Container([
dbc.CardHeader(
[
html.H5(head, className="card-title"),
],style={'display':'flex','text-align':'center','height':'5rem','maxHeight':'20rem','align-items':'center','justify-content':'center'}
),
dbc.CardBody(html.Div([
DashIconify(
icon=icon,
width=60,
height=60,
color ='black',
style={'display': 'flex','margin': 'auto','justify-content':'center','align-items':'center'},
)
])
)])
]
return card
And this is all the contents for the page
third_page = dbc.Container([
dbc.Row([
dbc.ButtonGroup
([
dbc.Button("Learn more about Houston", color="dark", href='https://www.houston.org/'),
dbc.Button("Lear more about Texas", color="dark",href='https://www.texas.gov/'),
dbc.Button("Moving to Texas", color="dark",href='https://www.texas.gov/moving-to-texas/')
])
]),
dbc.Row([
dbc.Col(html.H3("Houston")),
dbc.Col(html.H3("Texas")),
]),
dbc.Row([
dbc.Col(
dbc.Card(
[
dbc.CardHeader("Census Houston Population by Ethnicity in 2021"),
dbc.CardBody(html.Div(id='houston-treemap',children=[],className='six columns')),
]),
),
dbc.Col(
dbc.Card(
[
dbc.CardHeader("Census Texas Population by Ethicity in 2021"),
dbc.CardBody(html.Div(id='texas-treemap',children=[ ],className='six columns')),
]),
),
],style={'padding-bottom':'1rem'}),
dbc.Row([
dbc.Col(
dbc.Card(
[
dbc.CardHeader("Houston Venture Capital Funding from 2016-2021"),
dbc.CardBody(html.Div(id='houston-bargraph',children=[],className='six columns')),
]),
),
dbc.Col(
dbc.Card(
[
dbc.CardHeader("Texas Venture Capital Funding from 2016-2021"),
dbc.CardBody(html.Div(id='texas-bargraph',children=[],className='six columns')),
]),
),
]),
dbc.Row([
dbc.Col(dbc.Card(card1, color="info", inverse=True)),
dbc.Col(dbc.Card(card2, color="info", inverse=True)),
dbc.Col(dbc.Card(card3, color="info", inverse=True)),
dbc.Col(dbc.Card(card4, color="info", inverse=True)),
],style={'padding-bottom':'1rem'}),
dbc.Row([
dbc.Col(dbc.Card(card5, color="info", inverse=True)),
dbc.Col(dbc.Card(card6, color="info", inverse=True)),
dbc.Col(dbc.Card(card7, color="info", inverse=True)),
dbc.Col(dbc.Card(card8, color="info", inverse=True)),
],style={'padding-bottom':'1rem'}),
],fluid=True)