Skip to Content
DocumentationExamplesOverview

Examples

Learn how to use GloST through practical examples. These examples demonstrate common patterns for rendering multilingual text with annotations.

What You’ll Find Here

Ruby Annotations

Learn how to render text with ruby annotations (furigana, pinyin, romanization) using GloST React components.

Progressive Display

Implement the 5-level progressive disclosure system to gradually reveal linguistic information.

Multi-Language Text

Work with multiple languages in a single document, handling different scripts and transcription systems.

Dialogues & Conversations

Create and render conversational dialogues with speaker attribution, perfect for language learning scenarios.

Quick Start

Install the packages:

npm install @glotblocks/glost @glotblocks/glost-react

Create a simple word with ruby annotation:

import { SimpleRubyWord } from "@glotblocks/glost-react"; import { createJapaneseWord } from "@glotblocks/glost"; const word = createJapaneseWord({ text: "日本語", transcription: { furigana: { text: "にほんご", system: "furigana" } }, translation: "Japanese language" }); function Example() { return ( <SimpleRubyWord word={word} transcriptionSystem="furigana" rubyPosition="over" showDefinition /> ); }

Package Overview

PackagePurpose
glostCore types, document creation, tree traversal
@glotblocks/glost-reactReact components for rendering with ruby annotations
@glotblocks/glost-dialogueDialogue and conversation support
@glotblocks/glost-processorUnified-style processor for plugins

Live Examples

Check out the GloST Playground  for interactive examples you can run locally.

Last updated on