PHPackages                             tentapress/custom-blocks - 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. tentapress/custom-blocks

ActiveLibrary

tentapress/custom-blocks
========================

v0.1.1(3mo ago)06MITPHPPHP ^8.2

Since Feb 5Pushed 3mo agoCompare

[ Source](https://github.com/tentaplane/plugin-custom-blocks)[ Packagist](https://packagist.org/packages/tentapress/custom-blocks)[ RSS](/packages/tentapress-custom-blocks/feed)WikiDiscussions main Synced 1mo ago

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

Custom Blocks
=============

[](#custom-blocks)

Single-file block discovery for active TentaPress themes.

Plugin Details
--------------

[](#plugin-details)

FieldValueID`tentapress/custom-blocks`Version`0.1.1`Provider`TentaPress\\CustomBlocks\\CustomBlocksServiceProvider`What It Does
------------

[](#what-it-does)

- Scans the active theme at `views/blocks/**/*.blade.php`
- Registers only files that include valid block metadata in a `tp:block` Blade comment
- Registers definitions into the `BlockRegistry`
- Makes discovered blocks available in the existing blocks editor

Block File Format
-----------------

[](#block-file-format)

Create a block file in your active theme, for example:

`themes///views/blocks/pricing.blade.php`

```
{{-- tp:block
{
    "name": "Pricing",
    "description": "Tiered pricing cards",
    "fields": [
        { "key": "headline", "label": "Headline", "type": "text" },
        { "key": "plans", "label": "Plans JSON", "type": "textarea", "rows": 8 }
    ],
    "defaults": {
        "headline": "Pricing",
        "plans": []
    }
}
--}}

  {{ $props['headline'] ?? '' }}

```

### Metadata behavior

[](#metadata-behavior)

- `tp:block` metadata is required for a file to be registered as a custom block.
- `type` is optional. If omitted, it defaults to `tentapress/custom-blocks/`.
- `view` is optional. If omitted, it defaults to `blocks.`.
- `name` and `description` fallback automatically if omitted.
- `fields`, `defaults`, `variants`, and `default_variant` follow the same shape as JSON block definitions.

Field Types (Admin Inputs)
--------------------------

[](#field-types-admin-inputs)

Each field is an object in the `fields` array with the core keys:

- `key` (string, required): stored under `props[key]`
- `label` (string, required): shown in the editor UI
- `type` (string, required): one of the types below

Optional keys supported on all field types:

- `help` (string): helper text below the input
- `placeholder` (string): placeholder text for text-like inputs

### Supported types

[](#supported-types)

**Text**

```
{ "key": "headline", "label": "Headline", "type": "text" }
```

**Textarea**

```
{ "key": "body", "label": "Body", "type": "textarea", "rows": 4 }
```

**Markdown**

```
{ "key": "content", "label": "Content", "type": "markdown", "rows": 10, "height": "240px" }
```

**Rich text**

```
{ "key": "summary", "label": "Summary", "type": "richtext" }
```

**Select**

```
{
  "key": "alignment",
  "label": "Alignment",
  "type": "select",
  "options": [
    { "value": "left", "label": "Left" },
    { "value": "center", "label": "Center" }
  ]
}
```

**Toggle**

```
{ "key": "show_border", "label": "Show border", "type": "toggle", "toggle_label": "Enabled" }
```

**Number**

```
{ "key": "columns", "label": "Columns", "type": "number", "min": 1, "max": 6, "step": 1 }
```

**Range**

```
{ "key": "opacity", "label": "Opacity", "type": "range", "min": 0, "max": 100, "step": 5 }
```

**Color**

```
{ "key": "accent", "label": "Accent Color", "type": "color" }
```

**URL**

```
{ "key": "cta_url", "label": "CTA URL", "type": "url" }
```

**Media**

```
{ "key": "hero_image", "label": "Hero Image", "type": "media" }
```

**Media list**

```
{ "key": "gallery", "label": "Gallery", "type": "media-list" }
```

### Notes

[](#notes)

- Any unrecognized `type` falls back to a standard text input.
- `defaults` are applied when fields are missing on a block.
- `variants` and `default_variant` are optional and follow the same structure as core block definitions.

Commands
--------

[](#commands)

```
php artisan tp:plugins sync
php artisan tp:plugins enable tentapress/custom-blocks
php artisan tp:plugins cache
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance82

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

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

Total

2

Last Release

94d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11545f8e3c50e6d1466ac2948bd15c952a2dc721ba413cfd9f72334a33715f1a?d=identicon)[csoutham](/maintainers/csoutham)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/tentapress-custom-blocks/health.svg)

```
[![Health](https://phpackages.com/badges/tentapress-custom-blocks/health.svg)](https://phpackages.com/packages/tentapress-custom-blocks)
```

PHPackages © 2026

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