Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Components
  2. Scrollable
  3. API and Development

Scrollable

API and Development

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Import Scrollable, ScrollableAxis, ScrollableScrollbarGutter and ScrollableScrollbarVisibility from @prepared911/ui/scrollable.
PropTypeNotes
axisScrollableAxisRequired. block, inline, or both.
childrenReactNodeMain content.
loadingRowReactNodeOptional row after children (document order).
errorRowReactNodeOptional row after loadingRow.
reverseOrderbooleanColumn-reverse content; pins to the live end when the reader is already there.
insetShadowbooleanEdge fades where more content lies beyond the scrollport. Default true.
fadeInlineEdgesbooleanWith axis="both", also fades inline edges when content overflows horizontally. Default false.
fadeInlineStartbooleanWith inline fades on, fades the inline-start edge. Pass false for inline-end only. Default true.
scrollbarHoldDurationTokenstringChroma duration custom property for how long data-scrolling stays set after the last scroll. Omit for 900ms.
scrollbarVisibilityScrollableScrollbarVisibilityHover (default) or Scroll.
scrollbarGutterScrollableScrollbarGutterAuto (default) leaves room for the block scrollbar only while the content overflows. Stable always keeps it (CSS scrollbar-gutter: stable), so two Scrollables with Stable keep the same content width. No effect with axis inline.
startAtEndbooleanMounts at the end of the scrolling axis and follows growth until the reader scrolls away. Default false.
onEndReached() => voidFires when the end sentinel intersects.
focusablebooleanMakes the region a tab stop whenever it overflows, even when it holds focusable descendants. Requires scrollRegionLabel or aria-labelledby. Default false.
scrollRegionLabelLocalizedMessageNames the region when it becomes focusable. Required with focusable unless aria-labelledby names it.
refRef<HTMLDivElement>Scroll root.
maxWidthMaxInlineSizeMaximum inline size of the frame.
maxHeightMaxBlockSizeMaximum block size of the frame.
Native div attributes pass through except style, tabIndex, className, layout props, and on* handlers.
Rendered structure
Previous
Scrollable / Usage
Next
Scrollable / Accessibility
On this page
Rendered structure