PHPackages                             riley19280/miro-clipboard - 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. riley19280/miro-clipboard

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

riley19280/miro-clipboard
=========================

Interact with the miro clipboard

v0.4.0(2y ago)28[2 PRs](https://github.com/Riley19280/miro-clipboard/pulls)MITPHP

Since Dec 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Riley19280/miro-clipboard)[ Packagist](https://packagist.org/packages/riley19280/miro-clipboard)[ RSS](/packages/riley19280-miro-clipboard/feed)WikiDiscussions main Synced yesterday

READMEChangelog (4)Dependencies (12)Versions (7)Used By (0)

 [![GitHub Workflow Status (master)](https://camo.githubusercontent.com/adcf9cb9b088603d5f2a8a61629e499d11d38e7932fefd6b51aa0f460bdb53c9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f72696c657931393238302f6d69726f2d636c6970626f6172642f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473)](https://github.com/riley19280/miro-clipboard/actions) [![Total Downloads](https://camo.githubusercontent.com/95245c50439b44a8cf4d6ac6c928773379f5ad40b9f8c50e85e1a2587273edd5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f72696c657931393238302f6d69726f2d636c6970626f617264)](https://packagist.org/packages/riley19280/miro-clipboard) [![Latest Version](https://camo.githubusercontent.com/1a3664b9456819f24b28d1193d28a711d06eba3df1f12f01ed68bf7ed1bd37bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f72696c657931393238302f6d69726f2d636c6970626f617264)](https://packagist.org/packages/riley19280/miro-clipboard) [![License](https://camo.githubusercontent.com/ca4e0585b71f1c24c642c90f4795ac105980b2a706fed3e098b5865fd4492c22/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f72696c657931393238302f6d69726f2d636c6970626f617264)](https://packagist.org/packages/riley19280/miro-clipboard)

Introduction
============

[](#introduction)

`miro-clipboard` allows you to generate and parse Miro clipboard data, allowing custom functionality to be built into existing applications with a simple Copy and Paste.

This package also serves to document the various properties and identifiers that are utilized in the clipboard data.

Creating Clipboard Data
-----------------------

[](#creating-clipboard-data)

Clipboard data is created using the `MiroClipboardData` class, and consists of multiple objects that can be added to it.

```
MiroClipboardData::make()
->addObject(MiroWidget::make()->shape(ShapeType::Circle))
->toHtml();
```

The following object types are available:

- [MiroShape](https://github.com/Riley19280/miro-clipboard/blob/main/src/Objects/MiroShape.php)
- [MiroLine](https://github.com/Riley19280/miro-clipboard/blob/main/src/Objects/MiroLine.php)

Finally, the `toHtml` method is used to retrieve the Miro data string that can be pasted. See [Pasting clipboard data](#pasting-clipboard-data) on how to properly paste into Miro.

Various methods are available on the Widget Objects to configure their position, size, style, and many other attributes. See below for a more complete example of what properties are available.

 MiroShape Example```
MiroWidget::make()
    ->shape(ShapeType::Star)
    ->text('Hello!')
    ->scale(.5)
    ->relativeScale(.5)
    ->rotation(90)
    ->relativeRotation(90)
    ->offsetPosition(50, 50)
    ->position(50, 50)
    ->size(50, 50)
    ->style(fn(MiroShapeStyle $style) => $style
        ->backgroundColor(16711680)->backgroundColor('#FF0000')
        ->backgroundOpacity(.5)
        ->borderColor(16711680)->borderColor('#FF0000')
        ->borderThickness(5)
        ->borderOpacity(.5)
        ->borderStyle(BorderStyle::DashLong)
        ->fontFamily('Arial')
        ->textColor(16711680)->textColor('#FF0000')
        ->textAlign(TextAlign::Left, VerticalTextAlign::Top)
        ->fontSize(11)
        ->bold()
        ->italic()
        ->underline()
        ->strikethrough()
    );
```

 MiroLine Example```
MiroWidget::make()
    ->line()
    ->addText(
        MiroLineText::make('Hello', .5, .5)
            ->color('#FF0000')
            ->color(16711680)
            ->rotated()
            ->fontSize(11)
            ->width(50)
    )
    ->setPoints([
        ['x' => 111.0, 'y' => 111.0],
        ['x' => 123.0, 'y' => 123.0],
        ['x' => 456.0, 'y' => 456.0],
        ['x' => 500.0, 'y' => 500.0],
    ])
    ->style(fn(MiroLineStyle $style) => $style
        ->jump()
        ->type(LineType::Square)
        ->strokeWeight(4)
        ->color('#FF0000')
        ->color(16711680)
        ->startingLinecap(LineCap::Circle)
        ->endingLinecap(LineCap::CircleFilled)
        ->pattern(LinePattern::Dotted)
    );
```

### Pasting clipboard data

[](#pasting-clipboard-data)

In order to paste the data into Miro, the resulting string needs to be copied as the `text/html` content type, which may or may not get applied depending on your computer. To combat this, a file called `clipboardLoader.html`is included in this repository. It provides a way to load the copied string into the clipboard as the correct content type so that it can be pasted into Miro.

If you are using this package to integrate into an existing application, then you will want to do something similar to load the data directly.

Parsing Clipboard Data
----------------------

[](#parsing-clipboard-data)

Existing clipboard data can also be parsed into objects. This is done using the `MiroParser` class.

```
$clipboardData = MiroClipboardData::parse('');
```

This results in a `MiroClipboardData` object.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 68% 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 ~51 days

Total

4

Last Release

766d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/14127031?v=4)[Riley19280](/maintainers/Riley19280)[@Riley19280](https://github.com/Riley19280)

---

Top Contributors

[![Riley19280](https://avatars.githubusercontent.com/u/14127031?v=4)](https://github.com/Riley19280 "Riley19280 (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/riley19280-miro-clipboard/health.svg)

```
[![Health](https://phpackages.com/badges/riley19280-miro-clipboard/health.svg)](https://phpackages.com/packages/riley19280-miro-clipboard)
```

###  Alternatives

[illuminate/support

The Illuminate Support package.

630113.0M41.5k](/packages/illuminate-support)[illuminate/collections

The Illuminate Collections package.

27078.0M1.1k](/packages/illuminate-collections)[illuminate/events

The Illuminate Events package.

13557.0M2.1k](/packages/illuminate-events)[illuminate/database

The Illuminate Database package.

2.8k54.9M11.7k](/packages/illuminate-database)[spatie/laravel-medialibrary

Associate files with Eloquent models

6.1k43.2M632](/packages/spatie-laravel-medialibrary)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M282](/packages/illuminate-pipeline)

PHPackages © 2026

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