From 47a3a1657f7dc7fd9755538e36ed1913ec2cb73c Mon Sep 17 00:00:00 2001 From: Emir Karabeg Date: Fri, 28 Feb 2025 17:50:40 -0800 Subject: [PATCH] improvement(ux): autocomplete off on envvars and toolbar --- components/ui/input.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/ui/input.tsx b/components/ui/input.tsx index c3f2671ff0..4d4774126a 100644 --- a/components/ui/input.tsx +++ b/components/ui/input.tsx @@ -2,7 +2,8 @@ import * as React from 'react' import { cn } from '@/lib/utils' const Input = React.forwardRef>( - ({ className, type, ...props }, ref) => { + ({ className, type, autoComplete = 'off', name, ...props }, ref) => { + const randomName = name || `input-${Math.random()}` return ( >( className )} ref={ref} + autoComplete={autoComplete} + autoCorrect="off" + autoCapitalize="off" + spellCheck="false" + name={randomName} {...props} /> )