Componentdata0.75 KB gzipZero dependencies
Glossary List
Glossary list with letter index tabs and term definitions.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add glossary-listOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { GlossaryList } from "@/components/ui/glossary-list"; <GlossaryList />Source code
glossary-list.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxglossary-list.tsx57 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface GlossaryTerm { id: string; term: string; definition: string;} export interface GlossaryListProps extends React.HTMLAttributes<HTMLDivElement> { terms: GlossaryTerm[];} /** Glossary list: alphabet jump index + term definitions. */export function GlossaryList({ terms = [], className, ...props }: GlossaryListProps) { const sorted = [...terms].sort((a, b) => a.term.localeCompare(b.term, "tr"));Props
| Prop | Type | Description |
|---|---|---|
| terms | GlossaryTerm[] | Configures terms. (Default: []) |