Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

lynx-ui-input

FreeRuns bundled scriptsNot checked

Build and troubleshoot text entry with lynx-ui Input, TextArea, and KeyboardAware primitives, including controlled values, native filtering, selection, and…

lynx-familyby lynx-family★ 122 GitHub stars

About this skill

lynx-ui-input SKILL

lynx-ui-input provides headless single-line and multiline text entry for ReactLynx, plus composable keyboard avoidance. Import its public components and ref types from @lynx-js/lynx-ui.

1. Core Capabilities

  • Text entry: Use Input for single-line fields and TextArea for multiline content. Both accept className and style without imposing a visual theme.
  • Value ownership: Use value + onInput for controlled fields, or defaultValue for an initial uncontrolled value.
  • Native editing: Configure keyboard type, confirmation key, character filtering, length limits, and read-only behavior through the wrapper props.
  • Editing callbacks: Receive text, selection offsets, and optional input method editor (IME) composition state without unpacking native event objects.
  • Imperative operations: InputRef and TextAreaRef expose asynchronous focus, blur, value access, and selection methods.
  • Keyboard avoidance: Compose KeyboardAwareRoot, KeyboardAwareResponder, and KeyboardAwareTrigger to move a region or scroll the focused field into view.

2. AI Coding Guide

Minimal Usable Example (Controlled)

import { useState } from '@lynx-js/react'
import { Input, TextArea } from '@lynx-js/lynx-ui'

function ProfileFields() {
  const [name, setName] = useState('')
  const [bio, setBio] = useState('')

  return (
    <view>
      <Input
        value={name}
        onInput={setName}
        placeholder='Name'
        maxLength={60}
        style={{ width: '100%', height: '44px' }}
      />
      <TextArea
        value={bio}
        onInput={setBio}
        placeholder='About you'
        maxLength={600}
        maxLines={8}
        style={{ width: '100%', height: '120px' }}
      />
    </view>
  )
}

Give fields a usable width and a deliberate height or content-sizing policy. Compose labels, borders, icons, clear buttons, and validation messages in surrounding views.

Public API Boundary

The wrappers render <input> and <textarea>. The native x-input-ng and x-textarea-ng implementations inform the behavior notes below, but their complete native attribute and event surface is not the ReactLynx wrapper API.

Wrapper API Native mapping / behavior
value, defaultValue Applied through the native setValue method.
onInput(value, start, end, isComposing?) Unpacks bindinput details into positional arguments.
onFocus(value), onBlur(value), onConfirm(value) Each receives the text string.
onSelectionChange(start, end) Unpacks bindselection; offsets are native text positions.
maxLength maxlength; wrapper default is 140.
inputFilter input-filter; pass a regex string.
confirmType confirm-type; wrapper default is 'send'.
showSoftInputOnFocus show-soft-input-on-focus; defaults to true.
TextArea.maxLines, lineSpacing maxlines (default 40) and line-spacing.
TextArea.bounces iOS bounce behavior; defaults to true.

Use readonly (lowercase), not DOM readOnly or disabled. These wrappers do not expose onChange, autoFocus, rows, autoHeight, raw inputProps / textareaProps, or arbitrary native prop spreading. Native options such as confirm-enter and native line-count or keyboard-height events are not exposed either. Do not add these props to generated consumer code.

Recommended Prompt Formula

Field: [single-line Input / multiline TextArea] for [purpose]. Value ownership: [controlled value + onInput / uncontrolled defaultValue]. Editing rules: [keyboard type], [allowed characters], [length / line limit], and [validation timing]. Keyboard behavior: [confirmation action], [focus or selection action], and [no avoidance / translated region / scrollable form]. Appearance: [dimensions], [labels and surrounding controls].

Example Prompts:

  • "Build a controlled search Input with confirmType='search'. Update the text immediately and debounce search requests while respecting IME composition."
  • "Build an uncontrolled numeric Input with a six-character limit and a clear button using InputRef.setValue('')."
  • "Build a profile form with Input and TextArea inside a vertical KeyboardAwareResponder. Keep each focused field above the keyboard."

3. Use

Full SKILL.md on GitHub

Install lynx-ui-input in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

Bundled files

CHANGELOG.mdLICENSEREADME.mdREADME_zh.mddocs/APIReference.mdxdocs/README.mdxdocs/README.zh.mdxpackage.jsonrslib.config.tssrc/Input.tsxsrc/KeyboardAwareContext.tsxsrc/KeyboardAwareResponder.tsxsrc/KeyboardAwareRoot.tsxsrc/KeyboardAwareTrigger.tsxsrc/NativeTypings.d.tssrc/TextArea.tsxsrc/index.tsxsrc/keyboardAwareUtils.tssrc/types/index.docs.tssrc/types/index.tstsconfig.docs.jsontsconfig.jsonvitest.config.ts

FAQ

What does the lynx-ui-input skill do?

Build and troubleshoot text entry with lynx-ui Input, TextArea, and KeyboardAware primitives, including controlled values, native filtering, selection, and keyboard avoidance.

How do I install the lynx-ui-input skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the lynx-ui-input skill run scripts?

Yes, this skill bundles executable scripts. Review the source before installing.

Related skills

Compare lynx-ui-input with