Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

lynx-ui-input

БесплатноЗапускает вложенные скриптыНе проверен

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

lynx-familyот lynx-family★ 122 звезды на GitHub

Об этом скилле

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

Полный SKILL.md на GitHub

Установить lynx-ui-input в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

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

Что делает скилл lynx-ui-input?

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

Как установить скилл lynx-ui-input?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл lynx-ui-input запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить lynx-ui-input с