Definition

Definition

Structured term-definition block for glossaries and key concept callouts

Installation

npx @ravikumarsurya/mdx-ui add definition

Usage

import { Definition } from "@/components/mdx/definition";
 
<Definition term="Memoization">
  An optimization technique that stores the results of expensive function calls
  and returns the cached result when the same inputs occur again.
</Definition>;

Examples

Invariant
A condition that holds true before and after every operation on a data structure or algorithm.
Big-O Notation
A mathematical notation describing the upper bound of an algorithm's time or space complexity as the input size grows.

Single definition

<Definition term="Invariant">
  A condition that holds true before and after every operation on a data
  structure.
</Definition>

With a source citation

<Definition term="OTP Fuse" source="Qualcomm QFPROM ICD">
  One-Time Programmable fuse bits that store configuration and cryptographic
  keys. Once written, the value cannot be changed.
</Definition>

Multiple definitions in sequence

Use consecutive Definition blocks to build a mini-glossary inline.

<Definition term="Tensor">
  A multi-dimensional array used to represent data in machine learning models.
</Definition>
 
<Definition term="Quantization">
  Reducing numeric precision (e.g. FP32 → INT8) to decrease model size and
  improve inference speed with minimal accuracy loss.
</Definition>

Props

PropTypeDefaultDescription
termstringThe term being defined (required)
sourcestringOptional source or reference label
childrenReact.ReactNodeThe definition text (required)
classNamestringAdditional CSS classes