PHPackages                             sitegeist/chitchat - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. sitegeist/chitchat

ActiveNeos-package[Utility &amp; Helpers](/categories/utility)

sitegeist/chitchat
==================

Random texts to be used as styleguide props

v1.2.1(1y ago)211.9k—0%3GPL-3.0-or-laterPHP

Since Jun 9Pushed 1y ago2 watchersCompare

[ Source](https://github.com/sitegeist/Sitegeist.ChitChat)[ Packagist](https://packagist.org/packages/sitegeist/chitchat)[ RSS](/packages/sitegeist-chitchat/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (4)Dependencies (4)Versions (11)Used By (3)

Sitegeist.ChitChat
==================

[](#sitegeistchitchat)

Deterministic randomized text generator for styleguide props
------------------------------------------------------------

[](#deterministic-randomized-text-generator-for-styleguide-props)

Presentational components for the monocle styleguide tend to have longish @styleguide.props that are hard to maintain, tend to overshadow the actual component and often do not provide enough diversion to actually test different text lengths.

ChitChat generates pseudo random texts that can be used in styleguide props. The texts are generated uniquely for each insertion point (fusion path) using pseudo random numbers.

The implementation was inspired by the js library getlorem . Also the word list we use started as a copy from getlorem.

### Authors &amp; Sponsors

[](#authors--sponsors)

- Melanie Wüst -
- Martin Ficzel -

*The development and the public-releases of this package is generously sponsored by our employer .*

Installation
------------

[](#installation)

Sitegeist.ChitChat is available via packagist and can be installed with the command `composer require sitegeist/chitchat`.

We use semantic-versioning so every breaking change will increase the major-version number.

Usage
-----

[](#usage)

The `Line` and `Text` prototypes generate a pseudo random text. The text is much longer and structured as multiple sentences. Both prototypes allow to enable formatting via `links`, `strong` and `em`.

```
prototype(Sitegeist.ChitChat:CardExample) < prototype(Neos.Fusion:Component) {
    @styleguide {
        title = "ChitChat CardExample"

        props {
            # a short text without formatting
            title = Sitegeist.ChitChat:Line
            # a textblock with multiple sentences and some formatting
            description = Sitegeist.ChitChat:Text {
                length = 250
                link = true
                strong = true
                em = true
            }
        }
    }

    title = null
    description = null

    renderer = afx`

            {props.title}
            {props.description}

    `
}

```

For simulating longer and formatted texts chitchat brings prototypes to simulate Html Headings, Paragraphs and Lists. Those allow to specify the expected structure of the `content` prop. Together with the afx syntax this allows to efficiently mock larger texts.

```
prototype(Sitegeist.ChitChat:TextExample) < prototype(Neos.Fusion:Component) {
    @styleguide {
        title = "ChitChat TextExample"

        props {
            # a block with mutltiple headlines paragraphs and lists
            content = afx`

            `
        }
    }

    content = null

    renderer = afx`
        {props.content}
    `
}

```

### Base Prototypes

[](#base-prototypes)

The base prototypes `Text` and `Line` will create text without block formatting whule
`Number` creates integer numbers.

- `Sitegeist.ChitChat:Text`: (string) long textblock containing multiple sentences
- `Sitegeist.ChitChat:Line`: (string) short textblock without
- `Sitegeist.ChitChat:Number`: (int)

All prototypes have the properties:

- `probability` (string|null) the name of the probability as configured in the settings.
- `seed` (string|null) the source of randomness in addition to the fusion path

The `Text` and `Line` prototypes support in addition:

- `dictionary` (string|null) the name of the dictionaries as configured in the settings
- `length` (int|100 bzw. 500) the maximal length the text should have
- `variance` (float|0.5) the factor the actual length can be smaller than the configured `length`.
- `link` (bool|false) add links to some items `...`
- `strong` (bool|false) make some items bold `...`
- `em` (bool|false) emphasize some items `...`

The `Number` prototype supports in addition:

- `min` (int|0) the minimal number to create
- `max` (int|100) the maximal number to create

### Textblock Fusion Prototypes

[](#textblock-fusion-prototypes)

The textblocks extend the base prototypes with block formatting. Otherwise they support the same properties as `Text` and `Line`.

- `Sitegeist.ChitChat:H1`: (string) A sentence in a h1-tag
- `Sitegeist.ChitChat:H2`: (string) A sentence in a h2-tag
- `Sitegeist.ChitChat:H3`: (string) A sentence in a h3-tag
- `Sitegeist.ChitChat:H4`: (string) A sentence in a h4-tag
- `Sitegeist.ChitChat:P`: (string) A sentence in a p-tag with links, strong and em

### List Fusion Prototypes

[](#list-fusion-prototypes)

The list prototypes extend the base prototypes with list formatting. The prototypes have the properties as the base prototypes, in addition the property `number` allows to specify how many items are to be generated.

- `Sitegeist.ChitChat:UL`: (string) Multiple sentences as unordered list with links, strong and em
- `Sitegeist.ChitChat:OL`: (string) Multiple sentences as ordered list with links, strong and em

Additional properties:

- `number` (int|5) the number of items to generate ... defaults to a random number between 5 and 10

Configuration
-------------

[](#configuration)

The configuration allows to configure alternate implementations for

```
Sitegeist:
  ChitChat:

    # the dictionary and probability to use if nothing else is specified
    defaults:
      dictionary: pseudoLatin
      probability: predictable

    # providers for random numbers
    probablility:
      predictable: 'Sitegeist\ChitChat\Domain\PredictableProbabilityProvider'
      random: 'Sitegeist\ChitChat\Domain\RandomProbabilityProvider'

    # dictionaries
    dictionaries:
      pseudoLatin: 'Sitegeist\ChitChat\Domain\PseudoLatinDictionaryProvider'
```

Randomness vs predictability
----------------------------

[](#randomness-vs-predictability)

While predictable text generation is important for stable tests and therefore is the default. The testing of frontend prototypes sometimes benefits from completely random texts that are regenerated on every call.

To allow this the probability mode can be configured via setting `Setting` or fusion path `probability`. By default the modes `random` and `predictable` are available.

Replacing the dictionary or "how to speak klingon"
--------------------------------------------------

[](#replacing-the-dictionary-or-how-to-speak-klingon)

To implement custom dictionaries you can provide alternate implementations of the interface `\Sitegeist\ChitChat\Domain\DictionaryProviderInterface`.

The dictionaries are registered via Setting.yaml:

```
Sitegeist:
  ChitChat:
    dictionaries:
      klingon: 'Vendor\Example\KlingonDictionaryProvider'
```

And can later be used like this:

```
text = Sitegeist.ChitChat:Text {
  dictionary = 'klingon'
}

```

Contribution
------------

[](#contribution)

We will gladly accept contributions. Please send us pull requests.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance42

Moderate activity, may be stable

Popularity27

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~220 days

Total

4

Last Release

459d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/829b4ccb51e8cff3c1e4b59d60cfe8d1b86f6d77fc31a6b3fc99227f432542ca?d=identicon)[mficzel](/maintainers/mficzel)

---

Top Contributors

[![mficzel](https://avatars.githubusercontent.com/u/1309380?v=4)](https://github.com/mficzel "mficzel (23 commits)")

---

Tags

neoscmsstyleguids

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/sitegeist-chitchat/health.svg)

```
[![Health](https://phpackages.com/badges/sitegeist-chitchat/health.svg)](https://phpackages.com/packages/sitegeist-chitchat)
```

###  Alternatives

[neos/neos

An open source Content Application Platform based on Flow. A set of core Content Management features is resting within a larger context that allows you to build a perfectly customized experience for your users.

1151.0M776](/packages/neos-neos)[neos/fusion-form

Fusion Form

19776.4k47](/packages/neos-fusion-form)[neos/fusion-afx

JSX inspired compact syntax for Neos.Fusion

26984.8k63](/packages/neos-fusion-afx)[packagefactory/atomicfusion-proptypes

Fusion port of react-propTypes for the fusion-prototypes PackageFactory.AtomicFusion:Component and Neos.Fusion:Component

12212.2k4](/packages/packagefactory-atomicfusion-proptypes)[sandstorm/neostwofactorauthentication

1327.0k](/packages/sandstorm-neostwofactorauthentication)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
