Wiki 9Minecraft Wiki 9Minecraft
Improperui Wiki › Guides › Build a Scrollable List or Panel

Build a Scrollable List or Panel

Setting Up Scrollable Content

Scrollable panels let you display more content than fits on screen. Create a container element and mark it as scrollable by setting the appropriate overflow property in your CSS-inspired script.

Configuring Scroll Behavior

1. Define a parent container with fixed width and height dimensions

2. Set the overflow property to enable scrolling (typically overflow: auto or overflow: scroll)

3. Add child elements (list items, text blocks, buttons) inside the container

4. Style the scrollbar appearance if your mod supports it

5. Test scrolling by using your mouse wheel or dragging the scrollbar

Dynamic Content in Lists

You can populate scrollable lists dynamically by adding elements to the container at runtime. Query the container by ID, then append new child elements as needed. This is useful for displaying inventories, player lists, or log messages.

Adjust the container's height and the child element sizes to control how many items appear before scrolling becomes necessary. Nested scrollable panels are possible but can be confusing for users—use them sparingly.