Skip to content

Input

Displays a form input field.

Example

import { UiLabel, UiCheckbox, UiIcons } from '@altdot/extension';
import { useState } from 'react';
export default function Command() {
const [value, setValue] = useState('');
return (
<>
<UiInput value={value} onValueChange={setValue} placeholder="Write something..." />
{value}
</>
);
}

Props

NameTypeDescription
inputSize?('default' | 'sm')The input’s size variant. Default to default
prefixIcon?JSX.ElementAdd prefix icon to the input
suffixIcon?JSX.ElementAdd suffix icon to the input
onValueChange?((value: string) => void)Fired when the input value is changed