DocsGitHub
Getting Started
  • Overview
  • Design Tokens
Components
  • Accordion
  • Alert
  • Announcement
  • Avatar
  • Badge
  • BigCalendar
  • Breadcrumb
  • Button
  • ButtonGroup
  • Calendar
  • Card
  • Checkbox
  • Chip
  • CloseButton
  • Combobox
  • CommandPalette
  • ContextMenu
  • Currency
  • DatePicker
  • DescriptionList
  • Drawer
  • DropdownMenu
  • EmptyState
  • Field
  • FileUpload
  • FormGrid
  • Hotkey
  • Icon
  • Input
  • Metric
  • Modal
  • MultiSelect
  • NumberInput
  • Pagination
  • Popover
  • ProgressBar
  • Radio
  • Rating
  • SegmentedControl
  • Select
  • SelectionCard
  • Sidebar
  • Skeleton
  • Slider
  • Spinner
  • Stepper
  • Switch
  • Table
  • Tabs
  • Textarea
  • Timeline
  • TimePicker
  • Toast
  • Tooltip
  • TransferList
  • TreeView
  • Wizard
Charts
  • Overview
  • Area Chart
  • Bar Chart
  • Donut Chart
  • Line Chart
  • Pie Chart
  • Stacked Bar Chart

Input

A text input field with support for labels, icons, and validation.

Installation

tsx
import { Input } from "madagent";

Default

With Label

With Helper Text

Must be 3-20 characters

With Error

Invalid email address

With Icons

Disabled

PropTypeDefaultDescription
label
string
-Label displayed above the input
helperText
string
-Helper text displayed below the input
errorText
string
-Error message displayed below the input
iconLeft
ReactNode
-Icon rendered inside the input on the left
iconRight
ReactNode
-Icon rendered inside the input on the right
disabled
boolean
falseDisables the input

RTL Support

Components automatically adapt to right-to-left languages using CSS logical properties.

Preview

Usage

tsx
<div style={{ display: "flex", flexDirection: "column", gap: 16, maxWidth: 300 }}>
  <Input label="البريد الإلكتروني" placeholder="أدخل بريدك الإلكتروني" />
  <Input label="كلمة المرور" type="password" placeholder="أدخل كلمة مرورك" />
</div>