+
+
+ setFocused(true)}
+ onBlur={() => setFocused(false)}
+ onChange={handleChange}
+ className={styles.input()}
+ placeholder={placeholder}
+ aria-label={placeholder ?? 'Search'}
+ onKeyDown={handleEnterKey}
+ />
+
+
+ );
+};
diff --git a/src/shared/ui/SearchBar/SearchBar.variants.ts b/src/shared/ui/SearchBar/SearchBar.variants.ts
new file mode 100644
index 00000000..105e42b3
--- /dev/null
+++ b/src/shared/ui/SearchBar/SearchBar.variants.ts
@@ -0,0 +1,41 @@
+import { tv } from 'tailwind-variants';
+
+export const searchBarVariants = tv({
+ slots: {
+ root: ['flex flex-col'],
+ wrapper: [
+ 'flex items-center',
+ 'w-[550px] h-[44px]',
+ 'px-[15px] py-[10px]',
+ 'gap-[25px]',
+ 'rounded-[var(--radius-m)]',
+ 'transition-colors',
+ ],
+ icon: ['w-[24px] h-[24px] shrink-0', 'transition-colors'],
+ input: ['w-full bg-transparent outline-none', 'typo-body-1', 'placeholder:typo-body-1'],
+ },
+
+ variants: {
+ state: {
+ default: {
+ wrapper: ['bg-[var(--color-green-100)]'],
+ icon: ['text-[var(--color-gray-500)]'],
+ input: ['text-[var(--color-gray-500)]', 'placeholder:text-[var(--color-gray-500)]'],
+ },
+ filled: {
+ wrapper: ['bg-[var(--color-green-300)]'],
+ icon: ['text-[var(--color-black)]'],
+ input: ['text-[var(--color-black)]', 'placeholder:text-[var(--color-black)]'],
+ },
+ focused: {
+ wrapper: ['bg-[var(--color-green-300)]'],
+ icon: ['text-[var(--color-black)]'],
+ input: ['text-[var(--color-black)]'],
+ },
+ },
+ },
+
+ defaultVariants: {
+ state: 'default',
+ },
+});
diff --git a/src/shared/ui/SearchBar/index.ts b/src/shared/ui/SearchBar/index.ts
new file mode 100644
index 00000000..8c193316
--- /dev/null
+++ b/src/shared/ui/SearchBar/index.ts
@@ -0,0 +1 @@
+export { SearchBar } from './SearchBar';