JGuang

Input

Input · Chakra UI

Preview
npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0

Input

Used to get user input in a text field.

Compose single-line input with Field labels/errors and appropriate type/autocomplete. Mask, payment and form-library examples require their full extra dependency closure.

Included icon notices

The source viewer includes ICON_ATTRIBUTION.md and original notices for the icon collections used by these examples. Preserve them when redistributing examples; react-icons' wrapper license does not replace individual collection terms.

  • Lucide: ISC

Installation and initialization

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0

Initialize ChakraProvider with defaultSystem and Emotion before rendering. Preserve the host React version and inspect peer compatibility. Official npm installation supplies components, not these example source files. Use the resource setup guide for locale, next-themes and framework-specific SSR; copy the selected example source separately from npm installation.

Complete native usage example

This is the actual pinned example, not a generic API mock. Copy its source closure and retain the named export. Additional imports are listed per example below.

import { Input } from "@chakra-ui/react"

export const InputBasic = () => {
  return <Input placeholder="Enter your email" />
}

All examples and reproduction requirements

Names identify demos, not component variant props. Copy every sourceFiles entry for the selected example. The compositions alias denotes local files, not a package. Preserve relative imports or rewrite the alias to your project's actual path. React peers are inspected separately; editor examples retain the coherent pinned Tiptap extension family.

Basic

input-basic · Named export InputBasic · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-basic.tsx

With Variants

input-with-variants · Named export InputWithVariants · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-variants.tsx

With Sizes

input-with-sizes · Named export InputWithSizes · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-sizes.tsx

With Helper Text

input-with-helper-text · Named export InputWithHelperText · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-helper-text.tsx

With Error Text

input-with-error-text · Named export InputWithErrorText · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-error-text.tsx

With Field

input-with-field · Named export InputWithField · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-field.tsx

With Hook Form

input-with-hook-form · Named export InputWithHookForm · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-hook-form@7.77.0
  • vendor/apps/compositions/src/examples/input-with-hook-form.tsx

With Start Icon

input-with-start-icon · Named export InputWithStartIcon · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0
  • vendor/apps/compositions/src/examples/input-with-start-icon.tsx

With Start Text

input-with-start-text · Named export InputWithStartText · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-start-text.tsx

With Start And End Text

input-with-start-and-end-text · Named export InputWithStartAndEndText · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-start-and-end-text.tsx

With Kbd

input-with-kbd · Named export InputWithKbd · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0
  • vendor/apps/compositions/src/examples/input-with-kbd.tsx

With Select

input-with-select · Named export InputWithSelect · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-select.tsx

With Start Addon

input-with-start-addon · Named export InputWithStartAddon · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-start-addon.tsx

With End Addon

input-with-end-addon · Named export InputWithEndAddon · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-end-addon.tsx

With Start And End Addon

input-with-start-and-end-addon · Named export InputWithStartAndEndAddon · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-start-and-end-addon.tsx

With Disabled

input-with-disabled · Named export InputWithDisabled · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-disabled.tsx

With End Button

input-with-end-button · Named export InputWithEndButton · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-end-button.tsx

With Focus Error Color

input-with-focus-error-color · Named export InputWithFocusErrorColor · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-focus-error-color.tsx

With Placeholder Style

input-with-placeholder-style · Named export InputWithPlaceholderStyle · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-placeholder-style.tsx

With Floating Label

input-with-floating-label · Named export InputWithFloatingLabel · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-floating-label.tsx

With Mask

input-with-mask · Named export InputWithMask · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 use-mask-input@3.10.1
  • vendor/apps/compositions/src/examples/input-with-mask.tsx

With Character Counter

input-with-character-counter · Named export InputWithCharacterCounter · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-character-counter.tsx

With Card Number

input-with-card-number · Named export InputWithCardNumber · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0 react-payment-inputs@1.2.0 && npm install -D @types/react-payment-inputs@1.1.4
  • vendor/apps/compositions/src/examples/input-with-card-number.tsx

With Card Details

input-with-card-details · Named export InputWithCardDetails · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0 react-icons@5.6.0 react-payment-inputs@1.2.0 && npm install -D @types/react-payment-inputs@1.1.4
  • vendor/apps/compositions/src/examples/input-with-card-details.tsx

With Clear Button

input-with-clear-button · Named export InputWithClearButton · original upstream example

npm install @chakra-ui/react@3.37.0 @emotion/react@11.14.0
  • vendor/apps/compositions/src/examples/input-with-clear-button.tsx

Native API and source references

The source viewer retains original declarations, imports and inheritance. Ark UI event contracts, Chakra style props and recipe types stay in their native packages; this guide does not flatten or invent their defaults. Code comments remain original source, not translated prose.

  • npm/@chakra-ui/react@3.37.0/dist/types/components/input/index.d.ts
  • npm/@chakra-ui/react@3.37.0/dist/types/components/input/input.d.ts

State and installation checks

Run strict types, the target production build and real interactions. Test labels/focus/keyboard, both themes, narrow layout, empty/loading/error states where supported and cleanup after unmount. Remote demo endpoints, uploads and downloads are constrained in the preview; configure your own services. Copying a command or reaching preview-ready does not prove installation or backend success.

Provenance and license boundaries

https://github.com/chakra-ui/chakra-ui/tree/2e7517745cff2fcde0b8012f136cf99611ff262a

These are JGuang practical bilingual notes, not a full translation of upstream MDX. Original documentation and example bytes remain in vendor. Preserve repository MIT, compositions ISC metadata and separate dependency notices. The original metadata discrepancy and any missing full notices remain explicit review items; paid Chakra Pro is excluded.