@mks2508/mks-ui
Components

InputGroup

Compose input with prefix/suffix addons and icon decorations.

InputGroup

A wrapper component for composing inputs with prefix/suffix text, icons, or button addons.

Import

import { InputGroup, InputGroupAddon, InputGroupInput } from '@mks2508/mks-ui/react';

Basic Usage

Basic Usage
https://
.tsx
<InputGroup>
<InputGroupAddon>https://</InputGroupAddon>
<InputGroupInput placeholder="example.com" />
</InputGroup>

With Suffix

With Suffix
.com
.tsx
<InputGroup>
<InputGroupInput placeholder="Enter amount..." />
<InputGroupAddon>.com</InputGroupAddon>
</InputGroup>

With Both

With Prefix and Suffix
$
USD
.tsx
<InputGroup>
<InputGroupAddon>$</InputGroupAddon>
<InputGroupInput type="number" placeholder="0.00" />
<InputGroupAddon>USD</InputGroupAddon>
</InputGroup>

API Reference

ComponentPropsDescription
InputGroupclassName, childrenRoot container
InputGroupInputInput propsStyled input element
InputGroupAddonclassName, childrenPrefix/suffix addon