list-box-empty

PreviousNext
Docs
takiexample

Preview

Loading preview…
registry/new-york/examples/list-box-empty.tsx
"use client"

import React from "react"

import { ListBox } from "@/registry/new-york/ui/list-box"

export default function ListBoxEmpty() {
  return (
    <ListBox
      aria-label="Search results"
      renderEmptyState={() => (
        <div className="flex min-h-[150px] items-center justify-center">
          <p className="text-muted-foreground text-sm">No results found</p>
        </div>
      )}
      className="w-64"
    >
      {[]}
    </ListBox>
  )
}

Installation

npx shadcn@latest add @taki/list-box-empty

Usage

import { ListBoxEmpty } from "@/components/list-box-empty"
<ListBoxEmpty />