Skip to main content

Input

An input.

Usage

import { Input } from "@fedibtc/ui"
import { useState } from "react"

function MyComponent() {
const [value, setValue] = useState("")

return (
<div>
<Input value={value} onChange={e => setValue(e.target.value)} />
</div>
)
}

Custom Props

Excluding default props from React.InputHTMLAttributes<HTMLInputElement>

NameTypeDescription
valuestringThe value of the input.
labelReact.ReactNodeA label to display above the input.
placeholderstringA placeholder to display when the input is empty.
disabledbooleanWhether the input is disabled.
width"auto" | "full"Whether the input should take full width.
textOverflow"clip" | "ellipsis"Whether the input text should overflow or be cut off.
adornmentReact.ReactNodeAn additional element to display at the end of the input.