Core@paxeer/core/inputimplemented
Input
shadcn Input restyled to MD3.
Install
$
pnpm exec designx add @paxeer/core/inputPreview
Loading preview...
Source code
components/designx/core/input.tsxtsx
import { type ComponentProps } from "react";
import { cn } from "../lib/cn";
/** Adapted from shadcn/ui Input. */
export function Input({ className, type, ...props }: ComponentProps<"input">) {
return (
<input
type={type}
data-slot="input"
className={cn(
"dx-focus-ring h-10 w-full min-w-0 rounded-[var(--md-sys-shape-corner-small)] border border-outline-variant bg-surface-container-lowest px-3 py-1 text-[length:var(--md-sys-typescale-body-medium-size)] text-on-surface shadow-xs selection:bg-primary selection:text-on-primary file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-on-surface placeholder:text-on-surface-variant disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
"aria-invalid:border-error",
className,
)}
{...props}
/>
);
}
Dependencies
Registry dependencies