PHPackages                             marktic/embeddable - 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. marktic/embeddable

ActiveLibrary

marktic/embeddable
==================

Embeddable widgets library for SaaS applications

04↑2900%PHP

Since Mar 28Pushed 1mo agoCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

marktic/embeddable
==================

[](#markticembeddable)

Embeddable widgets library for SaaS applications. Provides a framework for defining, configuring, and embedding iframe-based widgets in external sites.

Features
--------

[](#features)

- Define widgets as PHP classes with typed configurable properties
- Auto-generate embed HTML (`` + optional ``)
- Admin bundle with a widget builder UI (tabbed interface, customize form, live preview, copy-to-clipboard embed code)
- Property types: `TextProperty`, `NumberProperty`, `SelectProperty`, `CheckboxProperty`

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

[](#installation)

```
composer require marktic/embeddable
```

Usage
-----

[](#usage)

### Define a Widget

[](#define-a-widget)

```
use Marktic\Embeddable\Widgets\AbstractWidget;
use Marktic\Embeddable\WidgetProperties\TextProperty;
use Marktic\Embeddable\WidgetProperties\SelectProperty;

class MyWidget extends AbstractWidget
{
    public function getName(): string { return 'my-widget'; }
    public function getLabel(): string { return 'My Widget'; }

    public function getProperties(): array
    {
        return [
            new TextProperty('title', 'Title', 'Default Title'),
            new SelectProperty('theme', 'Theme', ['light' => 'Light', 'dark' => 'Dark'], 'light'),
        ];
    }

    protected function getBaseUrl(): string
    {
        return 'https://myapp.com/widgets/my-widget';
    }
}
```

### Define a Widget Collection

[](#define-a-widget-collection)

```
use Marktic\Embeddable\Widgets\WidgetsCollection;

class MyWidgets extends WidgetsCollection
{
    protected static function widgetClasses(): array
    {
        return [
            'my-widget' => MyWidget::class,
        ];
    }
}
```

### Get Embed HTML

[](#get-embed-html)

```
$widget = new MyWidget();
echo $widget->getHtml();
// or with parameters:
echo $widget->getHtml(['theme' => 'dark', 'title' => 'Hello']);
```

### Admin Bundle Controller

[](#admin-bundle-controller)

```
use Marktic\Embeddable\Bundle\Modules\Admin\Controllers\HasWidgetsControllerTrait;

class MyWidgetsController
{
    use HasWidgetsControllerTrait;

    protected function getWidgetsClass(): string
    {
        return MyWidgets::class;
    }
}
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance60

Regular maintenance activity

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bee4d69e72d2a9819fbbb63e3d81c904273f04bbcce9e0105c0f40fba73ef73d?d=identicon)[gabrielsolomon](/maintainers/gabrielsolomon)

---

Top Contributors

[![gabrielsolomon](https://avatars.githubusercontent.com/u/17990591?v=4)](https://github.com/gabrielsolomon "gabrielsolomon (6 commits)")[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (3 commits)")

### Embed Badge

![Health badge](/badges/marktic-embeddable/health.svg)

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

PHPackages © 2026

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