Lynx

Reaction Button

A component that allows users to express reactions to content. Used to easily provide emotional feedback such as likes and interests.

Engine ≥ 3.6
Available since@seed-design/lynx-react@0.6.0, @seed-design/lynx-css@0.10.0

Installation

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

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

Usage

Loading Lynx example…

Props

Prop

Type

pressed?boolean | undefined
defaultPressed?boolean | undefined
onPressedChange?((pressed: boolean) => void) | undefined
disabled?boolean | undefined
loading?boolean | undefined
style?CSSProperties | undefined
children?React.ReactNode
className?string | undefined
bindtap?EventHandler<BaseTouchEvent<Target>> | undefined
main-thread:bindtap?EventHandler<BaseTouchEvent<Element>> | undefined

Examples

Small

Loading Lynx example…

Xsmall

Loading Lynx example…

Disabled

Loading Lynx example…

Loading

Loading Lynx example…

Even during loading, bindtap and onPressedChange still work. If you need to block events, use disabled together with loading.

Web Version Differences

Lynx ReactionButton has the following differences from React ReactionButton:

  • Event Handling: Uses bindtap instead of onClick.
  • Rendering Elements: Renders native <view> and <text> elements instead of HTML <button>.
  • Accessibility Attributes: Uses Lynx native accessibility-* attributes instead of aria-*.
  • HTML Features: Does not support button/form attributes, keyboard focus, or asChild.
  • Loading State: Positions a spinner absolutely and hides existing content to maintain the original button width. Events are preserved like React.

Table of contents