@hanzo/ui

Span

import { useSpan } from '@hanzo/ui'

No examples yet.

Types

export interface Span {
  /** The width React knows, px: the kept one, or `initial`. */
  span: number
  /** The element whose `--span` is the width. */
  ref: (node: unknown) => void
  /**
   * Spread on that element: gui props that carry `--span`. gui emits a custom
   * property from `$platform-web` as its own class; its types name only CSS
   * properties, so the props are handed over as a bag.
   */
  props: object
  /** The width while a drag moves it, px. */
  move: (n: number) => void
  /** The width it settled on, px: drawn, known and kept. */
  keep: (n: number) => void
}

Exports

useSpan