Skip to main content
  • Foundation
  • Color palette
  • Typography
  • Icons
  • Golden ratio
  • Grid system
  • Shadows & glow
  • Motion
  • Theme
  • Theme switcher
  • Color rosette
  • Theme customizer
  • Core
  • Button
  • Badge
  • Alert
  • Card
  • Dropdown
  • Menu
  • Popover
  • Doc Search
  • Global Search
  • Floating Action Button
  • Ripple
  • Expanding Cards
  • Spotlight
  • Timeline
  • Template
  • Navigation
  • Feedback
  • Modal
  • Toast
  • Tooltip
  • Chip
  • Skeleton
  • Preloader
  • Data display
  • Avatar
  • Table
  • Collection
  • Breadcrumb
  • Interactive
  • Tabs
  • Accordion
  • Flow
  • Draggable
  • Search
  • Canvas
  • Charts
  • Flowchart
  • Media
  • Image Box
  • Effects
  • Glass
  • Surfaces
  • Morph
  • Parallax
  • Liquid Gradient
  • Forms
  • Form controls
  • Login
  • Form validation
  • Datepicker
  • Timepicker
  • Rating
  • Switch
  • Slider
  • Stepper
  • Autocomplete
  • Transfer
  • Tree
  • Pagination
  • Button group
  • Primitives
  • Progress
  • Spinner
  • Code snippet
  • Layout
  • Primitives
  • Separator
  • Sidenav
  • Sticky
  • Waypoint (Scrollspy)
  • Off-canvas
  • Navbar
  • Oola Dock
  • Footer
Search

The framework ships a small registry for plugging named data sources into a search overlay. The package does NOT ship a UI — overlays (e.g. a global search modal) consume the registry. Sources can be local arrays, fetched JSON, or any async provider.

Live Search Filter Demo

Type below to filter the live catalog items registered with useSearch:

  • VdDock
    Morphing edge navigation bar
    /components/dock
  • VdDataTable
    Sortable, searchable, selectable data grid
    /components/table
  • VdImageBox
    Grid, masonry, bento, and filmstrip lightbox
    /media/image-box
  • useThemePreference
    Reactive palette, primary, neutral, and radius state
    /guides/css-variables
  • VdFlowchart
    Interactive node-and-edge canvas editor
    /canvas/flowchart
Result shape
interface Source {
  name: string;          // unique key (e.g. 'sections')
  label?: string;        // display name in result groups
  icon?: string;         // optional Phosphor class for the group header
  limit?: number;        // max results per source (default 10)
  fetch: (query, opts) => Promise<Result[]>;
}

interface Result {
  title: string;
  subtitle?: string;
  href: string;
  group?: string;
  icon?: string;
}
Registering sources
// One-time registration (e.g. in a Pinia store or app setup)
import { useSearch } from "@vanduo-oss/vd3";

const registry = useSearch();  // the process-wide search registry

registry.register({
  name: 'sections',
  label: 'Documentation Sections',
  icon: 'ph-book-open',
  limit: 8,
  fetch: async (query) => {
    const all = await fetch('/data/sections.json').then(r => r.json());
    return all
      .filter(s => s.title.toLowerCase().includes(query.toLowerCase()))
      .slice(0, 8)
      .map(s => ({ title: s.title, subtitle: s.section, href: '/docs/' + s.slug }));
  }
});

registry.register({
  name: 'guides',
  label: 'Guides',
  fetch: async (query) => { /* … */ }
});
Engine wiring
import { ref, onMounted } from 'vue';
import { useSearch } from "@vanduo-oss/vd3";

const root = ref<HTMLElement | null>(null);
useSearch(root);

// Sources are registered app-wide (see src/stores/search.ts). The composable
// just touches the global so it warms up alongside an overlay component.
API Reference
MethodDescription
registry.register(source)Add a source. Throws on duplicate name, missing name, or missing fetch.
registry.unregister(name)Remove a source by name. Returns boolean.
registry.list()Returns a frozen array of registered sources.
registry.query(text, options?)Runs every source in parallel and resolves to { text, sources[] }.
Accessibility
  • The registry is purely data — accessibility lives in the overlay that consumes it.
  • Result lists SHOULD expose role="listbox" with aria-label; items get role="option".
  • Use ↑/↓ for navigation, Enter for selection, Esc to close — consistent with a typical command-palette pattern.
  • Abort in-flight queries on input change so stale results don't race.