JGuang / JGuang UI
Components组件Base UIBase UI 组件

Input

A text input component for forms and user data entry with built-in styling and accessibility features.

Partially translated: Chinese navigation, titles, descriptions, and common headings. The technical body is currently in English.
Loading JGuang UI example…

Installation

Command

Manual

Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.

Copy and paste the following code into your project.

View complete source: components/ui/input.tsx

Update the import paths to match your project setup.

Usage

import { Input } from "@/components/ui/input"
<Input />

Basic

Loading JGuang UI example…

Field

Use Field, FieldLabel, and FieldDescription to create an input with a label and description.

Loading JGuang UI example…

Field Group

Use FieldGroup to show multiple Field blocks and to build forms.

Loading JGuang UI example…

Disabled

Use the disabled prop to disable the input. To style the disabled state, add the data-disabled attribute to the Field component.

Loading JGuang UI example…

Invalid

Use the aria-invalid prop to mark the input as invalid. To style the invalid state, add the data-invalid attribute to the Field component.

Loading JGuang UI example…

File

Use the type="file" prop to create a file input.

Loading JGuang UI example…

Inline

Use Field with orientation="horizontal" to create an inline input. Pair with Button to create a search input with a button.

Loading JGuang UI example…

Grid

Use a grid layout to place multiple inputs side by side.

Loading JGuang UI example…

Required

Use the required attribute to indicate required inputs.

Loading JGuang UI example…

Badge

Use Badge in the label to highlight a recommended field.

Loading JGuang UI example…

Input Group

To add icons, text, or buttons inside an input, use the InputGroup component. See the Input Group component for more examples.

Loading JGuang UI example…

Button Group

To add buttons to an input, use the ButtonGroup component. See the Button Group component for more examples.

Loading JGuang UI example…

Form

A full form example with multiple inputs, a select, and a button.

Loading JGuang UI example…

RTL

To enable RTL support in JGuang UI, see the RTL configuration guide.

Loading JGuang UI example…

Source: components/base/input.mdx

Technical documentation for JGuang UI.

On this page