Styled form controls for React applications
// Source: https://github.com/nexu-io/open-design | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { forwardRef } from 'react';
import type { InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
import { joinClassNames } from './class-names';
import styles from './form-controls.module.css';
export type InputProps = InputHTMLAttributes<HTMLInputElement>;
export const Input = forwardRef<HTMLInputElement, InputProps>(function Input(
{ className, ...props },
ref,
) {
return <input ref={ref} className={joinClassNames(styles.control, className)} {...props} />;
});
export type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
expor
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key