React.InputHTMLAttributes<HTMLInputElement>
🔗 label ▪️ variant ▪️ type ▪️ css
Input Props
interface InputProps
extends Omit<InputHTMLAttributes<HTMLInputElement>, "style"> {
/**
* Label for input
*/
label: string;
/**
* Name attribute for forms
*/
name: string;
/**
* Input variant
*/
variant?: "labelled" | "label-hidden";
/**
* Input type
*/
type?: "number" | "string";
/**
* Inline input overrides
*/
css?: React.CSSProperties;
}
<>
<Input label="Test label" />
</>
Rendered outputinput
<>
<Input label='Test variant' variant="labelled" css={{ marginBottom: 10 }} />
<Input label='Test variant' variant="label-hidden" />
</>
Rendered output<>
<Input label='String' type="string" css={{ marginBottom: 10 }} />
<Input label="Number" type="number" />
</>
Rendered output<>
<Input label='Custom css' css={{ width: '100%', maxWidth: 200 }} />
</>
Rendered output