Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Token Inspector

ProNew

Inspect token boundaries, vocabulary IDs and byte lengths directly inside a passage.

Installation

pnpm dlx shadcn@latest add @viewport/token-inspector

First time? Add the @viewport registry to components.json. Setup takes one minute.

Usage

The code behind the preview above comes with Truffle Pro.

Props

PropTypeDefault
tokens*Token[]

Tokenization produced by the caller's tokenizer, in text order.

—
encoding*string

Display name of the tokenizer or vocabulary used.

—

Accessibility

  • Tokens are individually named buttons. Whitespace is rendered literally and described in the inspector.