PHPackages                             jg/kirby-props - 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. jg/kirby-props

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

jg/kirby-props
==============

Kirby Props

v1.0.0(5y ago)411MITPHP

Since Jul 8Pushed 5y ago1 watchersCompare

[ Source](https://github.com/jongacnik/kirby-props)[ Packagist](https://packagist.org/packages/jg/kirby-props)[ RSS](/packages/jg-kirby-props/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Kirby Props → `kprops`
======================

[](#kirby-props--kprops)

Helper to convert arrays to [`Kirby\Cms\Content`](https://getkirby.com/docs/reference/@/classes/cms/content) objects, particularly useful for snippets:

**Pass props**

```
snippet('some-snippet', kprops([
  'text' => 'Here *is* some **text**',
  'image' => 'filename.jpg',
  'page' => 'some/page'
]));
```

**Access in `some-snippet`**

```

```

Usage
-----

[](#usage)

### `kprops($data, $parent, $raw)`

[](#kpropsdata-parent-raw)

- `Array $data` **\*required** → array to convert to [`Kirby\Cms\Content`](https://getkirby.com/docs/reference/@/classes/cms/content)
- `Page $parent` → parent `Page` object for the content object. Defaults to current page.
- `Boolean $raw` → if `true` returns content object directly. Default `false`.

Details
-------

[](#details)

Use the `$parent` argument when passing values (such as a filename), that belong to a specific page.

```
$data = [ 'image' => 'filename.jpg' ]; //  [ 'props' => Kirby\Cms\Content ]
```

This is ideal for snippets which expect arrays. That said, the `$raw` argument can be passed to directly return the `Content`:

```
$output = kprops([], page(), true); // => Kirby\Cms\Content
```

This is useful when using `kprops` outside of the context of snippets, or, if passing additional values into a snippet:

```
snippet('some-snippet', [
  'key' => 'value',
  'props' => kprops([], page(), true)
]);
```

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

[](#configuration)

You can set the `key` content is assigned to:

**config.php**

```
[
  'jg.kprops.key' => 'props' // default
]
```

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

[](#installation)

```
composer require jg/kirby-props

```

 Other installation methods### Download

[](#download)

Download and copy this repository to `/site/plugins/kirby-props`.

### Git submodule

[](#git-submodule)

```
git submodule add https://github.com/jongacnik/kirby-props.git site/plugins/kirby-props

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Unknown

Total

1

Last Release

2186d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/70fedd96f45b5458c2d1f10e0271e511ba29dd56b4e94784bd2196b6695e0594?d=identicon)[jg](/maintainers/jg)

---

Top Contributors

[![jongacnik](https://avatars.githubusercontent.com/u/974474?v=4)](https://github.com/jongacnik "jongacnik (2 commits)")

---

Tags

kirbykirby-pluginkirby3-plugin

### Embed Badge

![Health badge](/badges/jg-kirby-props/health.svg)

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

###  Alternatives

[getkirby/cms

The Kirby core

1.5k584.8k472](/packages/getkirby-cms)[medienbaecker/kirby-modules

Easily add modules to your pages

895.5k1](/packages/medienbaecker-kirby-modules)[distantnative/retour-for-kirby

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

14698.5k1](/packages/distantnative-retour-for-kirby)[arnoson/kirby-vite

Vite helper for Kirby CMS

9765.1k3](/packages/arnoson-kirby-vite)[bnomei/kirby3-dotenv

Kirby Plugin for environment variables from .env

4149.6k2](/packages/bnomei-kirby3-dotenv)[medienbaecker/kirby-alter

242.1k](/packages/medienbaecker-kirby-alter)

PHPackages © 2026

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