Skip to main content Sidebar
Skip to table of contents

    Spinner

    <pc-spinner> 0.1.0 experimental

    Spinners are used to show the progress of an indeterminate operation.

    <pc-spinner></pc-spinner>
    Code Edit

    Demos#

    Size#

    Spinners are sized based on the current font size. To change the size, set the font-size property on the spinner itself or on a parent element.

    Edit

    Track width#

    The width of the spinner’s track can be changed by setting the --track-width custom property.

    Edit

    Colour#

    The spinner’s colours can be changed by setting the --indicator-color and --track-color custom properties.

    Edit

    Custom properties#

    NameDescriptionDefault
    --track-widthThe width of the track.0.125rem
    --track-colorThe colour of the track.var(--pc-color-neutral-fill-normal)
    --indicator-colorThe colour of the spinner’s indicator.var(--pc-color-primary-fill-loud)
    --speedThe time it takes for the spinner to complete one animation cycle.2s

    Learn more about customising custom properties.

    Parts#

    NameDescription
    baseThe component’s base wrapper.

    Learn more about customising CSS parts.

    Importing#

    If you’re using the autoloader or the standard loader, you can skip this section. But if you’re cherry picking, you can use any of the following snippets to import this component.

    CDN (script tag) CDN (import) npm (import)

    To manually import this component from the CDN, copy this code snippet and paste it in your HTML.

    <script type="module" src="https://cdn.jsdelivr.net/npm/placer-toolkit@1.0.0-alpha.3/cdn/components/spinner/spinner.js"></script>

    To manually import this component from the CDN, copy this code snippet and paste it in your JavaScript file.

    import "https://cdn.jsdelivr.net/npm/placer-toolkit@1.0.0-alpha.3/cdn/components/spinner/spinner.js";

    To manually import this component from npm, copy this code snippet and paste it in your JavaScript file.

    import "placer-toolkit/dist/components/spinner/spinner.js";

    We’d love to hear from you. Please reach out to us with any questions or enquiries you may have.

    You can contact us via e‐mail at placer.coc.reports+contact@gmail.com.

    We look forward to hearing from you!

    Got it!
    Dangerous lands

    Whoa! You’ve wandered into the dangerous lands of Placer Toolkit. Version 0 is out of date and doesn’t meet EU privacy standards, including GDPR.

    Want the latest powers, security and compliance? Stick with the current version of Placer Toolkit!

    Yikes! Power up!