Strata UI

Declarative, reusable Minecraft UI with headless rendering and exact versioned Fabric adapters.
Back to Files

Strata 0.3.4 for Minecraft 1.21.4

File namestrata-runtime-minecraft-fabric-1.21.4-0.3.4.jar
Uploader
sya_risya_ri
Uploaded
Nov 15, 2026
Downloads
2
Size
2.9 MB
Mod Loaders
Fabric
File ID
9626973
Type
R
Release
Supported game versions
  • 1.21.4

Curse Maven Snippet

Fabric

modImplementation "curse.maven:strata-ui-1707720:9626973"

Learn more about Curse Maven

What's new

Strata 0.3.4

Strata 0.3.4 adds configurable content dragging and inertia to scroll viewports, direct scrollbar interaction, and optional wheel cycling for CycleButton. These notes describe changes from public 0.3.3.

Upgrade requirements

Update Strata artifacts together to 0.3.4 and keep the Fabric runtime matched to the exact Minecraft version. Remote CycleButton, ScrollArea and VirtualList now use version 2 schemas; update remote hosts and clients together.

Content dragging and inertia are enabled by default, including for existing ScrollState() calls. Buttons and actionable rows inside these viewports activate on a stationary release instead of the initial press. Use DragScrollOptions.Disabled when the screen requires immediate child presses.

Content dragging and inertia

Start a primary-pointer drag on viewport content, including buttons and actionable rows. Vertical motion at the configured threshold cancels the pending action and scrolls the content; releasing a stationary tap over the original item activates it. Horizontal sliders retain horizontal dragging and yield vertical motion to the scroll viewport. Captured dragging continues outside the viewport until release.

Released flicks decelerate on timed frames. Pressing a moving viewport stops it without activating the pressed item. Boundaries, navigation, state replacement and closing the screen cancel momentum.

Configure and retain the scroll state outside reevaluated UI content:

// Disable content dragging.
val wheelOnly = ScrollState(dragScroll = DragScrollOptions.Disabled)

// Drag the content and stop immediately on release.
val dragOnly = ScrollState(
    dragScroll = DragScrollOptions.Enabled(inertia = DragScrollOptions.Inertia.Disabled),
)

// Increase the drag threshold and stop a released flick sooner.
val tuned = ScrollState(
    dragScroll = DragScrollOptions.Enabled(
        dragThreshold = 8.0,
        inertia = DragScrollOptions.Inertia.Enabled(deceleration = 12.0),
    ),
)

These types are in dev.s7a.strata.component. Pass the state to ScrollArea, or through VirtualListState(scrollState = tuned) to VirtualList. The default threshold is 4 viewport-local logical pixels, and the default exponential velocity-decay rate is 9 per second. Both values must be finite and positive; a larger decay rate stops motion sooner. The sealed policy exposes inertia only when dragging is enabled, and a decay rate only when inertia is enabled. Wheel input, keyboard navigation and independent scrollbars remain available with any policy.

See screens and state and the compiled example for complete component calls.

Scrollbars and CycleButton

Independent scrollbars support track clicks and thumb dragging, retaining the grab position while the pointer moves outside their bounds. They are separate from content dragging.

CycleButton keeps Minecraft wheel cycling enabled by default. Set scrollEnabled = false to leave wheel input available to an ancestor scroll container:

CycleButton(selection, width = 150, scrollEnabled = false)