DEV Community

Cover image for Semantic Search UI with Tambo
Lahfir
Lahfir

Posted on

Semantic Search UI with Tambo

Let people ask in their own words. Show results they can act on.

Live demo · Source code


Why I built this

Most search experiences make people work too hard: pick the right category, open five filter drawers, guess which checkbox means what. It’s tiring.

I wanted something simpler: you type “show me laptops under $1500 with 16GB RAM” and immediately see useful cards you can skim, compare, and click. No flashy effects, no friction—just answers.

I built this template during the Tambo Hackathon by Tambo. My goal was personal: stop making people wrestle with filters and let them just ask for what they need. With limited time, I focused on what actually helps users—semantic understanding, clean cards, fast performance—and skipped everything that gets in the way.

What this template gives you

  • Generative UI with Tambo: Plain‑English queries are turned into structured intent (filters, sort, constraints) and friendly UI hints.
  • Card‑first results: Clean, responsive cards that highlight the details that matter.
  • Works across domains: Products, jobs, real estate, services, recipes, documents—anything you can search and present as cards.
  • Fast by default: Minimal JS, smart caching, mobile‑first, and no gratuitous animations.

It’s a pragmatic starting point for teams who need great semantic search without building a bespoke system from scratch.

How Tambo powers “generative UI”

Tambo converts fuzzy, natural language into something your UI can immediately use:

  • Understand intent: Extracts entities, constraints, preferences, and sort hints.
  • Propose UI: Suggests helpful refinements and short explanations (“Filtered to 2 bedrooms under $2k”).
  • Stay predictable: You keep control of what is rendered; Tambo just provides structured guidance.

The result is an interface that feels conversational without becoming chaotic.

Try these queries

“Find wireless headphones under $200 with noise canceling”
“2‑bedroom apartments downtown under $2,000 with in‑unit laundry”
“Remote senior React roles above $120k, US‑only”
“Men’s waterproof hiking boots, wide fit”
Enter fullscreen mode Exit fullscreen mode

You’ll get relevant, scannable cards—no labyrinth of filters required.

Real‑world examples included

  • Electronics: Specs, prices, compatibility
  • Real Estate: Beds, location, amenities
  • Jobs: Salary, skills, remote/hybrid
  • Fashion: Sizes, materials, styles

Same UI, different data. That’s the point.

Tech stack (kept intentionally simple)

Next.js 15 — Routing, data, and deployment
React 19 — Modern, stable UI primitives
TypeScript — Catch mistakes early
Tambo — Semantic understanding + UI guidance
Tailwind CSS — Fast, consistent styling
Enter fullscreen mode Exit fullscreen mode

Design choices that respect users

  1. Card‑first: Clear hierarchy, actionable info, easy comparison
  2. Mobile‑native: Touch targets sized right, no hover‑only affordances
  3. No gratuitous animations: Snappy over “smooth”
  4. Accessible by default: High contrast, sensible semantics

My baseline theme

:root {
  --background: #ffffff;
  --text: #000000;
  --accent: #0070f3;
  --border: #eaeaea;
}
Enter fullscreen mode Exit fullscreen mode

High contrast, zero clutter. Change it if you want; it won’t fight you.

Performance that feels instant

  • Tiny, focused bundles: Only what you need
  • Smart caching: Results feel instant after first query
  • Image optimization: Crisp cards, quick loads
  • No animation tax: Fewer libs, fewer jank sources

Getting started (2 minutes)

git clone https://github.com/lahfir/tambo-product-showcase
cd product-showcase
npm install
cp example.env.local .env.local
# Add your Tambo API key
echo "NEXT_PUBLIC_TAMBO_API_KEY=your-key-here" >> .env.local
npm run dev
Enter fullscreen mode Exit fullscreen mode

Open the app, type a query, and you’re off.

Make it yours

  • Swap the data source: Point the retrieval layer at your API or database (see src/services/*-data.ts).
  • Tune the cards: Adjust the fields and layout in the existing components under src/components/tambo/ so they show what matters for your domain.
  • Control the UI contract: You decide which Tambo signals you honor (filters, sort, facets, explanations) and how they render.

Because the template is domain‑agnostic, you can use it for anything that involves search, with results presented as cards.

Why simple wins

  1. Fast beats fancy: People want answers, not motion
  2. Mobile matters: Many users are on phones—optimize for that reality
  3. Clean scales: Fewer assumptions make it easier to adapt
  4. Less breaks less: Small surface area, fewer bugs

What’s next

I’m doubling down on the core experience:

  • Even faster first‑query results
  • More polished mobile ergonomics
  • Additional domain examples
  • Continued code cleanup and clarity

Built for teams who want to ship a semantic search today—not a science project tomorrow.

Top comments (0)