F+Foldkit Plus
HomeLearnPackagesComponentsPrimitivesDemosBlogGitHub ↗

Primitives

Guides

foldkit-primitives

  • Overview
  • Joining without a bundle: entries, Mounts, and Commands
  • Find a primitive by task
  • Subpaths by concern
  • Rules every primitive keeps

Media

  • Overview
  • Start with one: a media query
  • Breakpoints

Network

  • Overview
  • Start with one: online or not
  • websocket
  • SharedHost: one server for every tab

Time

  • Overview
  • Start with one: a timer
  • ticks: a clock the Model drives
  • debounce and Throttle

State

  • Overview
  • Start with one: a page
  • history: undo and redo over any value
  • Box: move and resize within limits
  • Virtual: a windowed list

Motion

  • Overview
  • Start with one: a tween
  • Presence: let content leave

Interaction

  • Overview
  • Choosing between near neighbours
  • Start with one: a toolbar with a roving tab stop
  • The pair, in one helper
  • What a parent decides: helpers
  • Finding and moving
  • Presence: a leaving row is out of reach
  • Pressing and dragging
  • Marquee: a lasso over marked items
  • Reorder: moving an item by keys and by pointer
  • Editing in place
  • Focus rings, overlays, selection, announcements
  • In the examples

Device

  • Overview
  • Start with one: where the device is
  • Cameras and microphones

Events

  • Overview
  • Start with one: is the tab visible
  • WindowSize, Idle, InputModality
  • The entries

Observers

  • Overview
  • Start with one: an element's size

DOM

  • Overview
  • Start with one: copy to the clipboard
  • The Commands
  • Mounts for focus
  • Mounts for layout
  • Swiping and scrolling to rest
  • PointerPosition: where the pointer is inside an element
  • keepScroll: the window's scroll across navigations
  • pointedLinks: where the reader may go next
  • visibleLinks: reading what is on screen

API

  • foldkit-primitives
  • foldkit-primitives/dom
  • foldkit-primitives/device
  • foldkit-primitives/events
  • foldkit-primitives/interaction
  • foldkit-primitives/media
  • foldkit-primitives/motion
  • foldkit-primitives/net
  • foldkit-primitives/observers
  • foldkit-primitives/state
  • foldkit-primitives/time

Open source, MIT
Foldkit 0.170 · Effect 4

Primitives / foldkit-primitives/dom

EDGE_SPEED

const · packages/primitives/src/dom/edge-scroll.ts:17

const EDGE_SPEED: 600
Previousfoldkit-primitives/dom

Edit on GitHub ↗

This site is a Foldkit Plus application, rendered at build time with foldkit-ssr. Its source

FoldkitEffectGitHub

Menu

HomeLearnPackagesComponentsPrimitivesDemosBlogGitHub ↗

Primitives

Guides

foldkit-primitives
  • Overview
  • Joining without a bundle: entries, Mounts, and Commands
  • Find a primitive by task
  • Subpaths by concern
  • Rules every primitive keeps
Media
  • Overview
  • Start with one: a media query
  • Breakpoints
Network
  • Overview
  • Start with one: online or not
  • websocket
  • SharedHost: one server for every tab
Time
  • Overview
  • Start with one: a timer
  • ticks: a clock the Model drives
  • debounce and Throttle
State
  • Overview
  • Start with one: a page
  • history: undo and redo over any value
  • Box: move and resize within limits
  • Virtual: a windowed list
Motion
  • Overview
  • Start with one: a tween
  • Presence: let content leave
Interaction
  • Overview
  • Choosing between near neighbours
  • Start with one: a toolbar with a roving tab stop
  • The pair, in one helper
  • What a parent decides: helpers
  • Finding and moving
  • Presence: a leaving row is out of reach
  • Pressing and dragging
  • Marquee: a lasso over marked items
  • Reorder: moving an item by keys and by pointer
  • Editing in place
  • Focus rings, overlays, selection, announcements
  • In the examples
Device
  • Overview
  • Start with one: where the device is
  • Cameras and microphones
Events
  • Overview
  • Start with one: is the tab visible
  • WindowSize, Idle, InputModality
  • The entries
Observers
  • Overview
  • Start with one: an element's size
DOM
  • Overview
  • Start with one: copy to the clipboard
  • The Commands
  • Mounts for focus
  • Mounts for layout
  • Swiping and scrolling to rest
  • PointerPosition: where the pointer is inside an element
  • keepScroll: the window's scroll across navigations
  • pointedLinks: where the reader may go next
  • visibleLinks: reading what is on screen

API

  • foldkit-primitives
  • foldkit-primitives/dom
  • foldkit-primitives/device
  • foldkit-primitives/events
  • foldkit-primitives/interaction
  • foldkit-primitives/media
  • foldkit-primitives/motion
  • foldkit-primitives/net
  • foldkit-primitives/observers
  • foldkit-primitives/state
  • foldkit-primitives/time

Open source, MIT
Foldkit 0.170 · Effect 4