Skip to main content Sidebar Design tokens Components Layout Style utilities

We’d love to hear from you. Please reach out to us with any questions or inquiries 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!
Skip to table of contents

The Placer Toolkit alpha has arrived! 🎉
Plenty of changes are coming your way—some big, some breaking, some even nuclear! Beware the changelog…

Bring it on!

    Scroller

    <pc-scroller> 1.0.0-alpha.1 experimental

    Scrollers create an accessible container while providing visual cues that help users and navigate.

    <pc-scroller class="scroller-overview">
        <table>
            <thead>
                <tr>
                    <th>Party role</th>
                    <th>Combat style</th>
                    <th>Group size</th>
                    <th>Campaign setting</th>
                    <th>Signature traits</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Warrior</td>
                    <td>Melee Tank</td>
                    <td>1–2</td>
                    <td>Forgotten Realms</td>
                    <td>Plate‐armored swordmaster who taunts foes.</td>
                </tr>
                <tr>
                    <td>Rogue</td>
                    <td>Stealth Striker</td>
                    <td>1</td>
                    <td>Eberron</td>
                    <td>Shadowy lockpick with daggers and a secret gold stash.</td>
                </tr>
                <tr>
                    <td>Wizard</td>
                    <td>Spell Slinger</td>
                    <td>1</td>
                    <td>Greyhawk</td>
                    <td>Robe‐clad mage hurling fireballs from a messy spellbook.</td>
                </tr>
                <tr>
                    <td>Cleric</td>
                    <td>Divine Support</td>
                    <td>1</td>
                    <td>Ravnica</td>
                    <td>Holy healer with a glowing amulet and sneaky ale habit.</td>
                </tr>
                <tr>
                    <td>Bard</td>
                    <td>Charisma King</td>
                    <td>1</td>
                    <td>Dragonlance</td>
                    <td>Lute‐playing charmer with magical songs and bad puns.</td>
                </tr>
            </tbody>
        </table>
    </pc-scroller>
    
    <style>
        .scroller-overview table {
            margin-block: 0;
        }
    
        .scroller-overview th,
        .scroller-overview td {
            white-space: nowrap;
        }
    
        .scroller-overview th:nth-child(5),
        .scroller-overview td:nth-child(5) {
            min-inline-size: 50ch;
            white-space: wrap;
        }
    </style>
    Code Edit

    Demos#

    Adding content#

    The scroller component automatically provides a scrollable container for any content that exceeds the available space. Simply add your content as children of the <pc-scroller> element and it will handle the rest.

    Edit

    Orientation#

    Set the orientation attribute to vertical and provide a height to create a vertical scroller.

    Edit

    No shadow#

    Use the no-shadow attribute to remove the fading shadow effect at the edges of the scroller.

    Edit

    No scrollbar#

    Use the no-scrollbar attribute to hide the scrollbar while maintaining scroll functionality. This creates a cleaner visual appearance but may reduce usability on content that needs a clear scrolling indicator.

    Edit

    Hiding scrollbars can negatively impact accessibility. Users who rely on visible scrollbars to navigate content may have difficulty recognising that content is scrollable or controlling their scroll position. Consider the needs of all users when implementing this option.

    Properties#

    NameDescriptionReflectsDefault
    orientationThe scroller’s orientation.
    Type: "horizontal" | "vertical"
    "horizontal"
    noScrollbar
    no-scrollbar
    Removes the visible scrollbar.
    Type: boolean
    false
    noShadow
    no-shadow
    Removes the shadow.
    Type: boolean
    false
    updateComplete A read‐only promise that resolves when the component has finished updating.

    Learn more about attributes and properties.

    Slots#

    NameDescription
    (default)The content to show inside the scroller.

    Learn more about using slots.

    Custom properties#

    NameDescriptionDefault
    --shadow-colorThe base colour of the shadow.var(--pc-color-surface-default)
    --shadow-sizeThe size of the shadow.2rem

    Learn more about customising custom properties.

    Parts#

    NameDescription
    contentThe container that wraps the slotted content.

    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.1/cdn/components/scroller/scroller.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.1/cdn/components/scroller/scroller.js";

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

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