Lynx

Action Button

A basic interaction component that helps users easily perform clear actions.

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

Installation

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

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

Usage

Loading Lynx example…

Props

Prop

Type

icon?React.ReactElement<LynxIconElementProps, string | React.JSXElementConstructor<any>> | undefined
prefixIcon?React.ReactElement<LynxIconElementProps, string | React.JSXElementConstructor<any>> | undefined
suffixIcon?React.ReactElement<LynxIconElementProps, string | React.JSXElementConstructor<any>> | undefined
flexGrow?boolean | Property.FlexGrow | undefined
children?React.ReactNode
className?string | undefined
bindtap?EventHandler<BaseTouchEvent<Target>> | undefined
main-thread:bindtap?EventHandler<BaseTouchEvent<Element>> | undefined
accessibility-label?string | undefined
accessibility-element?boolean | undefined
accessibility-traits?"disabled" | "text" | "image" | "button" | "link" | "header" | "search" | "selected" | "playable" | "keyboard" | "summary" | "updating" | "adjustable" | "tabbar" | "none" | undefined

Examples

Brand Solid

Loading Lynx example…

Neutral Solid

Loading Lynx example…

Neutral Weak

Loading Lynx example…

Critical Solid

Loading Lynx example…

Brand Outline

Loading Lynx example…

Neutral Outline

Loading Lynx example…

Ghost

Lynx supports basic Ghost styling. Custom color and fontWeight from the web are not supported.

Loading Lynx example…

Icon Only

Loading Lynx example…

Icon colors are not applied in the document preview. You can check the actual icon colors by running Lynx Explorer from the QR code tab.

Prefix Icon

Loading Lynx example…

Icon colors are not applied in the document preview. You can check the actual icon colors by running Lynx Explorer from the QR code tab.

Suffix Icon

Loading Lynx example…

Icon colors are not applied in the document preview. You can check the actual icon colors by running Lynx Explorer from the QR code tab.

Disabled

Loading Lynx example…

Loading

Loading Lynx example…

Web Version Differences

Lynx ActionButton has the following differences from React ActionButton:

  • Event Handling: Uses bindtap instead of onClick.
  • Rendering Elements: Renders native <view>/<text> elements instead of HTML <button>.
  • Accessibility Labeling: Uses Lynx native accessibility-label instead of aria-label.
  • ref Forwarding: Refs can be passed via React.forwardRef.
  • Icon Rendering: Uses tint-color on Lynx <image> instead of SVG currentColor on the web. Icon / PrefixIcon / SuffixIcon synchronize recipe color to native tint.
  • Compatible Icon Props: Legacy prefixIcon / suffixIcon / icon props are still supported, but examples use the child slot API by default.
  • Loading State: Both platforms position a spinner absolutely and hide existing content to maintain the original button width. Lynx prevents taps during loading, but the web does not prevent onClick with loading alone.

Unsupported Lynx Features

The following features are not supported due to current Lynx platform limitations.

FeatureWeb EquivalentDescription
colorStylePropsLimited CSS variable dynamic injection
fontWeightStylePropsLimited CSS variable dynamic injection
bleed / bleedX / bleedYStylePropsLimited CSS variable dynamic injection

The Bleed example from the React documentation uses bleed, bleedX, and bleedY which are not supported in Lynx, so it is excluded from Lynx Examples.

Table of contents