پیش‌نمایش زنده
کد HTML
<button
  class="[--background:#000000] [--color:#ffffff] [--muted:#242424] [--muted-foreground:#9c9c9c] [--border:#2e2e2e] relative inline-flex items-center whitespace-nowrap transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border border-[--border] bg-[--background] hover:bg-[--muted] text-[--muted-foreground] hover:text-[--color] px-4 py-2 justify-start rounded-[0.5rem] text-sm font-normal shadow-none h-8 w-64"
  type="button"
>
  <span class="hidden lg:inline-flex">Search docs...</span>
  <span class="inline-flex lg:hidden">Search...</span>
  <kbd
    class="pointer-events-none absolute right-[0.3rem] top-[0.3rem] flex h-5 select-none items-center gap-1 rounded border border-[--border] bg-[--muted] px-1.5 font-mono text-[10px] font-medium opacity-100 [&amp;_span]:text-xs"
  >
    <span>⌘</span>K
  </kbd>
</button>
کد CSS
.pointer-events-none {
  pointer-events: none;
}
.absolute {
  position: absolute;
}
.relative {
  position: relative;
}
.right-\[0\.3rem\] {
  right: 0.3rem;
}
.top-\[0\.3rem\] {
  top: 0.3rem;
}
.flex {
  display: flex;
}
.inline-flex {
  display: inline-flex;
}
.hidden {
  display: none;
}
.h-5 {
  height: 1.25rem;
}
.h-8 {
  height: 2rem;
}
.w-64 {
  width: 16rem;
}
.select-none {
  -webkit-user-select: none;
  user-select: none;
}
.items-center {
  align-items: center;
}
.justify-start {
  justify-content: flex-start;
}
.gap-1 {
  gap: 0.25rem;
}
.whitespace-nowrap {
  white-space: nowrap;
}
.rounded {
  border-radius: 0.25rem;
}
.rounded-\[0\.5rem\] {
  border-radius: 0.5rem;
}
.border {
  border-width: 1px;
}
.border-\[--border\] {
  border-color: var(--border);
}
.bg-\[--background\] {
  background-color: var(--background);
}
.bg-\[--muted\] {
  background-color: var(--muted);
}
.px-1\.5 {
  padding-left: 0.375rem;
  padding-right: 0.375rem;
}
.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}
.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}
.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
}
.text-\[10px\] {
  font-size: 10px;
}
.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}
.font-medium {
  font-weight: 500;
}
.font-normal {
  font-weight: 400;
}
.text-\[--muted-foreground\] {
  color: var(--muted-foreground);
}
.opacity-100 {
  opacity: 1;
}
.shadow-none {
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000),
    var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.transition-colors {
  transition-property:
    color,
    background-color,
    border-color,
    fill,
    stroke,
    -webkit-text-decoration-color;
  transition-property: color, background-color, border-color,
    text-decoration-color, fill, stroke;
  transition-property:
    color,
    background-color,
    border-color,
    text-decoration-color,
    fill,
    stroke,
    -webkit-text-decoration-color;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.\[--background\:\#000000\] {
  --background: #000000;
}
.\[--border\:\#2e2e2e\] {
  --border: #2e2e2e;
}
.\[--color\:\#ffffff\] {
  --color: #ffffff;
}
.\[--muted-foreground\:\#9c9c9c\] {
  --muted-foreground: #9c9c9c;
}
.\[--muted\:\#242424\] {
  --muted: #242424;
}
.hover\:bg-\[--muted\]:hover {
  background-color: var(--muted);
}
.hover\:text-\[--color\]:hover {
  color: var(--color);
}
.focus-visible\:outline-none:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.focus-visible\:ring-1:focus-visible {
  --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0
    var(--tw-ring-offset-width) var(--tw-ring-offset-color);
  --tw-ring-shadow: var(--tw-ring-inset) 0 0 0
    calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
  box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow),
    var(--tw-shadow, 0 0 #0000);
}
.disabled\:pointer-events-none:disabled {
  pointer-events: none;
}
.disabled\:opacity-50:disabled {
  opacity: 0.5;
}
@media (min-width: 1024px) {
  .lg\:inline-flex {
    display: inline-flex;
  }
  .lg\:hidden {
    display: none;
  }
}
.\[\&_span\]\:text-xs span {
  font-size: 0.75rem;
  line-height: 1rem;
}
نوع: button
تاریخ ایجاد: 2026/06/05
آخرین بروزرسانی: 2026/06/05