Lynx

Contextual Floating Button

A button that floats on the screen and appears only in specific situations to provide auxiliary actions.

Engine ≥ 3.9
Available since@seed-design/lynx-react@0.8.0, @seed-design/lynx-css@0.12.0

Installation

npm install @seed-design/lynx-react @seed-design/lynx-css

Lynx ContextualFloatingButton is provided directly from the @seed-design/lynx-react package without a separate ui:contextual-floating-button snippet.

Usage

Loading Lynx example…

Icon colors are not applied in the web preview. Check the actual icon colors in Lynx Explorer from the QR code tab.

Props

Prop

Type

style?CSSProperties | undefined
children?React.ReactNode
className?string | undefined
bindtap?EventHandler<BaseTouchEvent<Target>> | undefined
main-thread:bindtap?EventHandler<BaseTouchEvent<Element>> | undefined

Examples

Float Composition

Lynx does not have a Float component, so the same result is created using position="relative" on the reference frame and native absolute bottom-center positioning on the external Box.

Loading Lynx example…

Solid Variant

Loading Lynx example…

Layer Variant

Loading Lynx example…

Icon Only

With layout="iconOnly", also specify accessibility-label for screen readers to read.

Loading Lynx example…

Loading

When tapped, the loading state starts immediately and returns to the original state after 2 seconds. Tapping is disabled during loading.

Loading Lynx example…

Differences from Web Version

  • Event handling: bindtap or main-thread:bindtap is used instead of onClick.
  • Rendering elements: Native <view> and <text> elements are rendered instead of HTML <button>. HTML form props and asChild are not supported.
  • Accessibility: Native accessibility-label is used instead of aria-label.
  • Icons: Native icon assets are passed as PrefixIcon or Icon child slots instead of web SVG. Recipe colors are synchronized with native icon tint.
  • Loading: Both platforms overlay a spinner as absolute and hide content to maintain button width. Lynx blocks taps during loading, but React does not block onClick with loading alone.
  • Scale Feedback: The root's transform is owned by the Scale Feedback hook. When you need to adjust position with transform, apply it to an external wrapper, not the button root.

Table of contents