PHPackages                             medienbaecker/kirby-playground - 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. medienbaecker/kirby-playground

ActiveKirby-plugin[Utility &amp; Helpers](/categories/utility)

medienbaecker/kirby-playground
==============================

Kirby Playground

1.2.2(3mo ago)1627MITPHP

Since Feb 13Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/medienbaecker/kirby-playground)[ Packagist](https://packagist.org/packages/medienbaecker/kirby-playground)[ RSS](/packages/medienbaecker-kirby-playground/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (1)Versions (10)Used By (0)

Kirby Playground
================

[](#kirby-playground)

[![An overview of different button styles](https://private-user-images.githubusercontent.com/7975568/412832403-c33d7d9e-70b9-431f-a811-932a1cd62943.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU0ODUwMzAsIm5iZiI6MTc3NTQ4NDczMCwicGF0aCI6Ii83OTc1NTY4LzQxMjgzMjQwMy1jMzNkN2Q5ZS03MGI5LTQzMWYtYTgxMS05MzJhMWNkNjI5NDMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDQwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA0MDZUMTQxMjEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDJkODhjZGM1YzZhNWEyY2M3NzUzNjc4MWQzYTc2OTkwZGRiOWRiYzUyNTI4YzA2Mjg4MDAxMDlmODI2NGQ4OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.erysUwxR3fgvVWUutvzrhd32clHCO1_7bfRp2w7Wq9s)](https://private-user-images.githubusercontent.com/7975568/412832403-c33d7d9e-70b9-431f-a811-932a1cd62943.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzU0ODUwMzAsIm5iZiI6MTc3NTQ4NDczMCwicGF0aCI6Ii83OTc1NTY4LzQxMjgzMjQwMy1jMzNkN2Q5ZS03MGI5LTQzMWYtYTgxMS05MzJhMWNkNjI5NDMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MDQwNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjA0MDZUMTQxMjEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDJkODhjZGM1YzZhNWEyY2M3NzUzNjc4MWQzYTc2OTkwZGRiOWRiYzUyNTI4YzA2Mjg4MDAxMDlmODI2NGQ4OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.erysUwxR3fgvVWUutvzrhd32clHCO1_7bfRp2w7Wq9s)

Usage
-----

[](#usage)

1. Create your tests as snippets in `/site/snippets/playground/`
2. Access your tests at `/playground/[component-name]`

For example, if you have a snippet named `buttons.php`, it will be available at `/playground/buttons`.

Features
--------

[](#features)

- Custom route handling for `/playground/(:any?)` that can optionally be restricted to logged-in users
- Components are rendered through virtual pages, without requiring actual page files
- Loads CSS files from `assets/css/playground/[component-name].css` and a global `playground.css`
- Built-in fallback to a component list when accessing non-existent components
- Placeholder helpers for lorem ipsum text and images

Placeholder Content
-------------------

[](#placeholder-content)

Generate placeholder content directly in your playground snippets (or anywhere else) by using the `Playground` class:

```
use Medienbaecker\Playground;
```

### Text

[](#text)

```
Playground::text([
    // word count (default: 20)
    'words' => 50,
    'words' => [30, 60],

    // wrap in  tags (default: false)
    'paragraphs' => false,
    'paragraphs' => true,
    'paragraphs' => 3,
    'paragraphs' => [2, 5],

    // insert random  tags (default: false)
    'links' => false,
    'links' => true,
    'links' => 2,
    'links' => [1, 3],

    // insert random  tags (default: false)
    'bold' => false,
    'bold' => true,
    'bold' => 1,
    'bold' => [1, 2],

    // insert random  tags (default: false)
    'italic' => false,
    'italic' => true,
    'italic' => 1,
    'italic' => [1, 3],

    // start with (default: 'Lorem ipsum ')
    'prefix' => 'Lorem ipsum ',
    'prefix' => false,

    // end with (default: '.')
    'suffix' => '.',
    'suffix' => false,
])
```

For names, titles, or other non-sentence content, set `prefix` and `suffix` to `false` (or `null` or `''`):

```
Playground::text(['words' => 5, 'prefix' => false, 'suffix' => false])
```

This way you will get random words, *not* starting with Lorem ipsum and *not* ending with a period.

### Images

[](#images)

Returns virtual Kirby File objects with full thumb support. Images are downloaded from [picsum.photos](https://picsum.photos) and cached locally.

```
// Seeded image (recommended - cached locally)
Playground::image('hero')  // shorthand
Playground::image(['seed' => 'hero'])
Playground::image(['seed' => 'card', 'width' => 400, 'height' => 300])

// Specific image by picsum ID
Playground::image(['id' => 237])

// Multiple images
Playground::images(6, ['seed' => 'gallery'])  // gallery-0, gallery-1, ...
Playground::images(4, ['width' => 400, 'height' => 300, 'seed' => 'thumbs'])

// Random image (downloads fresh each page load - slow!)
Playground::image()
Playground::images(6)

// With file content (alt, caption, etc.)
Playground::image(['seed' => 'hero', 'content' => ['alt' => 'Hero image', 'caption' => Playground::text(['words' => 10])]])
```

**Use seeds for fast page loads.** Unseeded images download from picsum.photos on every request. Seeded images are cached locally after the first download.

Full thumb support:

```
Playground::image('hero')->thumb('card')
Playground::image('test')->crop(200, 200)
```

Images are cached in `media/plugins/kirby-playground/source/`. Clear the media folder to re-download.

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

[](#configuration)

You can enable authentication to restrict access to logged-in Panel users:

```
// site/config/config.php
return [
  'medienbaecker.playground.auth' => true
];
```

Directory Structure
-------------------

[](#directory-structure)

```
assets/
├── css/
│   └── playground/
│       ├── playground.css
│       └── your-component.css
site/
├── snippets/
│   └── playground/
│       └── your-component.php

```

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance79

Regular maintenance activity

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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 ~43 days

Recently: every ~3 days

Total

9

Last Release

110d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7975568?v=4)[Thomas Günther](/maintainers/medienbaecker)[@medienbaecker](https://github.com/medienbaecker)

---

Top Contributors

[![medienbaecker](https://avatars.githubusercontent.com/u/7975568?v=4)](https://github.com/medienbaecker "medienbaecker (14 commits)")

---

Tags

kirbykirby-pluginkirby4kirby5

### Embed Badge

![Health badge](/badges/medienbaecker-kirby-playground/health.svg)

```
[![Health](https://phpackages.com/badges/medienbaecker-kirby-playground/health.svg)](https://phpackages.com/packages/medienbaecker-kirby-playground)
```

###  Alternatives

[distantnative/retour-for-kirby

Manage redirects and track 404s right from the Kirby CMS Panel

14689.4k1](/packages/distantnative-retour-for-kirby)[mzur/kirby-uniform

A versatile Kirby plugin to handle web form actions.

26068.3k13](/packages/mzur-kirby-uniform)[arnoson/kirby-vite

Vite helper for Kirby CMS

9759.2k3](/packages/arnoson-kirby-vite)[thathoff/kirby-git-content

Plugin to track changes to content in a git repository.

15343.7k](/packages/thathoff-kirby-git-content)[sylvainjule/locator

A map &amp; geolocation field, built on top of open-source services / Mapbox

11237.3k1](/packages/sylvainjule-locator)[tobimori/kirby-seo

The default choice for SEO on Kirby: Implement technical SEO &amp; Meta best practices with ease and provide an easy-to-use editor experience

10039.7k1](/packages/tobimori-kirby-seo)

PHPackages © 2026

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