F+Foldkit Plus
HomeLearnPackagesComponentsDemosGitHub ↗

Primitives

Guides

foldkit-primitives

  • Overview
  • Which form a primitive takes
  • Sixty seconds: follow the color scheme
  • The other three ways in
  • Find one by the job
  • The map
  • Rules every primitive keeps

Media

  • Overview
  • Start with one: a media query

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
  • Virtual: a windowed list

Motion

  • Overview
  • Start with one: a tween

Interaction

  • Overview
  • Start with one: a toolbar with a roving tab stop
  • Finding and moving
  • Pressing and dragging
  • 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
  • Mounts for focus
  • Mounts for layout

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.168 · Effect 4

Primitives / foldkit-primitives/events

InputModalityModel

const · packages/primitives/src/events/input-modality.ts:9

const InputModalityModel: Schema.Struct<{
  readonly modality: Schema.Literals<
    readonly ['keyboard', 'pointer', 'unknown']
  >
}>

Its type

type InputModalityModel = typeof InputModalityModel.Type
Previousfoldkit-primitives/events

Edit on GitHub ↗

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

FoldkitEffectGitHub