Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spinner size #577

Closed
richlegrand opened this issue May 7, 2021 · 3 comments
Closed

spinner size #577

richlegrand opened this issue May 7, 2021 · 3 comments
Milestone

Comments

@richlegrand
Copy link

When specifying the size of the spinner through spinner_style, it doesn't change the size of the spinner.

spinner_style={"width": "5rem", "height": "5rem"}

Specifying size though size works:

size="sm"

but there is no difference between "md" and "lg".

This worked in previous versions of dash bootstrap. I'm using version 0.12.2. I don't know the previous version numbers that worked.

thanks

@tcbegley
Copy link
Collaborator

tcbegley commented May 7, 2021

Hey @richlegrand, thanks for reporting and sorry for the regression.

I have just merged #578 which resolves the bug and also adds a number of tests so that hopefully the same problem won't happen again. The fix will make it into the next release of dash-bootstrap-components. Since we only just released a new version this probably won't happen immediately, but you can use the pre-release I just made

pip install dash-bootstrap-components==0.12.3a1

Alternatively, you can still set the size of the spinner with a little custom CSS like in the following example

import dash
import dash_bootstrap_components as dbc

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

app.layout = dbc.Container(
    dbc.Spinner(color="primary"), className="p-5 large-spinner"
)

if __name__ == "__main__":
    app.run_server(debug=True)
.large-spinner .spinner-border {
  width: 5rem;
  height: 5rem;
}

BTW, there actually is no lg spinner in Bootstrap, there was an error in the docstring which I also fixed in #578.

@richlegrand
Copy link
Author

whoa, that was really quick -- thanks!

@tcbegley tcbegley added this to the 0.13.0 milestone Jul 6, 2021
@tcbegley
Copy link
Collaborator

Sorry for the delay making a full release, this is now resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants