lynx-ui-input
FreeRuns bundled scriptsNot checkedBuild and troubleshoot text entry with lynx-ui Input, TextArea, and KeyboardAware primitives, including controlled values, native filtering, selection, and…
by lynx-family★ 122 GitHub starsAbout 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
Inputfor single-line fields andTextAreafor multiline content. Both acceptclassNameandstylewithout imposing a visual theme. - Value ownership: Use
value+onInputfor controlled fields, ordefaultValuefor 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:
InputRefandTextAreaRefexpose asynchronous focus, blur, value access, and selection methods. - Keyboard avoidance: Compose
KeyboardAwareRoot,KeyboardAwareResponder, andKeyboardAwareTriggerto 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
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
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
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
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
by Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
by Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
by Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
by Anthropic