Primitive

SwipeContainer

Auto-emitted from DSKintsugiCatalog.swipecontainer. Tier atom.

Live Preview
axis: .horizontal · pageSize: 300×180 · indicator: .dots · current index 2 of 3
Panel 2 Strategy Grids
Native · macOS
macOS SwiftUI render of SwipeContainer
DSL usage
// Horizontal swipe — 3 panels, page-dot indicator
// Native gesture: DragGesture(minimumDistance: 20)
//   → offset animation → onPageChange fires with new index
// CSS web variant: scroll-snap-type: x mandatory
//   + scroll-snap-align: start on each panel

katagami.swipecontainer(
  axis: .horizontal,
  pageSize: CGSize(width: 300, height: 180),
  indicator: .dots,
  onPageChange: { index in
    viewModel.currentPage = index
  }
) {
  // Page 0
  katagami.semantic(role: .section, ariaLabel: "Panel 1") {
    ModuleSummary(module: .portfolioAnalytics)
  }
  // Page 1
  katagami.semantic(role: .section, ariaLabel: "Panel 2") {
    ModuleSummary(module: .strategyGrids)
  }
  // Page 2
  katagami.semantic(role: .section, ariaLabel: "Panel 3") {
    ModuleSummary(module: .indicatorsDaily)
  }
}
Attributes
NameTypeDefaultDescription
axis SwipeAxis .horizontal .horizontal | .vertical — gesture direction and scroll-snap axis
pageSize CGSize 300×200 Exact size of each page panel; container clips to this frame
indicator PageIndicator .dots .dots (gold active / line inactive) | .bar (thin progress bar) | .none
onPageChange (Int) -> Void { _ in } Fires with the new zero-based page index after each completed swipe gesture
density Density regular compact | regular | expanded
locale Locale en BCP-47 locale tag for locale-aware rendering
Used in
sigma-analytics c-tech