📄 drei/misc/example

File: example.md | Updated: 11/15/2025


title: Example sourcecode: src/core/Example.tsx

[!Note] Solely for CONTRIBUTING purposes

A "counter" example.

<Example font="/Inter_Bold.json" />
type ExampleProps = {
  font: string
  color?: Color
  debug?: boolean
  bevelSize?: number
}

Ref-api:

const api = useRef<ExampleApi>()

<Example ref={api} font="/Inter_Bold.json" />
type ExampleApi = {
  incr: (x?: number) => void
  decr: (x?: number) => void
}