diff --git a/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/css-modules/index.module.css b/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/css-modules/index.module.css
index a334b19e6e4..9a75dd7b59a 100644
--- a/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/css-modules/index.module.css
+++ b/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/css-modules/index.module.css
@@ -115,11 +115,45 @@
}
}
-.Input {
+.InputGroup {
box-sizing: border-box;
position: relative;
z-index: 1;
- padding: 0 0.75rem;
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ padding-left: 0.75rem;
+ background-color: white;
+ cursor: text;
+
+ @media (prefers-color-scheme: dark) {
+ background-color: oklch(14.5% 0 0deg);
+ }
+
+ &:focus-within {
+ outline: 2px solid oklch(14.5% 0 0deg);
+ outline-offset: -1px;
+
+ @media (prefers-color-scheme: dark) {
+ outline-color: white;
+ }
+ }
+}
+
+.InputIcon {
+ flex-shrink: 0;
+ width: 1rem;
+ height: 1rem;
+ color: oklch(55.6% 0 0deg);
+
+ @media (prefers-color-scheme: dark) {
+ color: oklch(70.8% 0 0deg);
+ }
+}
+
+.Input {
+ box-sizing: border-box;
+ padding: 0 0.75rem 0 0;
margin: 0;
border: none;
width: 100%;
@@ -129,7 +163,7 @@
font-size: 0.875rem;
line-height: 1.25rem;
font-weight: 400;
- background-color: white;
+ background-color: transparent;
color: oklch(14.5% 0 0deg);
outline: none;
@@ -139,7 +173,6 @@
}
@media (prefers-color-scheme: dark) {
- background-color: oklch(14.5% 0 0deg);
color: white;
}
@@ -150,14 +183,6 @@
color: oklch(70.8% 0 0deg);
}
}
-
- &:focus {
- outline: 2px solid oklch(14.5% 0 0deg);
-
- @media (prefers-color-scheme: dark) {
- outline-color: white;
- }
- }
}
.ListArea {
diff --git a/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/css-modules/index.tsx b/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/css-modules/index.tsx
index d878fc7491a..57fea84b665 100644
--- a/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/css-modules/index.tsx
+++ b/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/css-modules/index.tsx
@@ -27,12 +27,15 @@ export default function ExampleAutocompleteCommandPalette() {
autoHighlight="always"
keepHighlight
>
-
+
+
+
+
Close command palette
@@ -94,6 +97,25 @@ export default function ExampleAutocompleteCommandPalette() {
);
}
+function MagnifyingGlassIcon(props: React.ComponentProps<'svg'>) {
+ return (
+
+ );
+}
+
interface Item {
value: string;
label: string;
diff --git a/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/tailwind/index.tsx b/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/tailwind/index.tsx
index e4e0ec238a3..b902a8bdfd8 100644
--- a/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/tailwind/index.tsx
+++ b/docs/src/app/(docs)/react/components/autocomplete/demos/command-palette/tailwind/index.tsx
@@ -31,12 +31,18 @@ export default function ExampleAutocompleteCommandPalette() {
autoHighlight="always"
keepHighlight
>
-
+
+
+
+
Close command palette
@@ -102,6 +108,25 @@ export default function ExampleAutocompleteCommandPalette() {
);
}
+function MagnifyingGlassIcon(props: React.ComponentProps<'svg'>) {
+ return (
+
+ );
+}
+
interface Item {
value: string;
label: string;