PHPackages                             prashantdhungana/social-embed - 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. prashantdhungana/social-embed

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

prashantdhungana/social-embed
=============================

Embed Youtube and Tiktok videos as an iframe

1.0.0(1y ago)010MITBladePHP ^8.1

Since Jul 4Pushed 1y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (2)Used By (0)

SocialEmbed Plugin
==================

[](#socialembed-plugin)

The `SocialEmbed` plugin is a custom Filament form component that allows users to embed TikTok and YouTube videos by providing a URL. This component extends the `TextInput` component from the Filament Forms library.

Features
--------

[](#features)

- Supports embedding videos from TikTok and YouTube.
- Customizable width and height for the embedded video.
- Automatic URL processing to generate the correct embed link.
- Live validation and updating of the embed link.
- Notification support for unsupported video platforms.

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

[](#installation)

1. Require the plugin via Composer:

    ```
    composer require prashantdhungana/social-embed
    ```
2. Add the `SocialEmbed` component to your form:

    ```
    use PrashantDhungana\SocialEmbed\SocialEmbed;

    SocialEmbed::make('video');
    ```

Usage
-----

[](#usage)

### Basic Usage

[](#basic-usage)

To use the `SocialEmbed` component in your form, simply call the `make` method and pass the name of the field:

```
```php
use PrashantDhungana\SocialEmbed\SocialEmbed;

SocialEmbed::make('video');
```

```

This will create a text input field with a placeholder prompting the user to enter a TikTok or YouTube video URL.

### Customizing Dimensions

[](#customizing-dimensions)

You can customize the width and height of the embedded video using the width and height methods:

```
```php
use PrashantDhungana\SocialEmbed\SocialEmbed;

SocialEmbed::make('video_url')
    ->width('80%')
    ->height('400');
```

```

### Notifications

[](#notifications)

If the provided URL is from an unsupported video platform, a notification will be displayed to the user.

Methods
-------

[](#methods)

`make(string $name): static`Creates a new instance of the `SocialEmbed` component.

`width(string $width): static`Sets the width of the embedded video. Accepts a string representing the width (e.g., `'100%'`).

`height(string $height): static`Sets the height of the embedded video. Accepts a string representing the height (e.g., `'500'`).

`getWidth(): string`Returns the current width of the embedded video.

`getHeight(): string`Returns the current height of the embedded video.

Processing Links
----------------

[](#processing-links)

The `processLink` method automatically processes the provided URL and generates the appropriate embed link. If the URL is not supported, a notification will be sent to the user.

Supported Platforms
-------------------

[](#supported-platforms)

- TikTok
- YouTube

Example URL Formats
-------------------

[](#example-url-formats)

- Tiktok: `https://www.tiktok.com/@username/video/123456789`
- Youtube: `https://www.youtube.com/watch?v=abcdefghijk`, `https://youtu.be/abcdefghijk`, `https://www.youtube.com/embed/abcdefghijk`

License
-------

[](#license)

This project is open-source and available under the MIT License.

Contributing
------------

[](#contributing)

Contributions are welcome! Please submit a pull request or open an issue to discuss any changes.

Credits
-------

[](#credits)

- [Prashant Dhungana](https://github.com/PrashantDhungana)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

674d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/prashantdhungana-social-embed/health.svg)

```
[![Health](https://phpackages.com/badges/prashantdhungana-social-embed/health.svg)](https://phpackages.com/packages/prashantdhungana-social-embed)
```

###  Alternatives

[kirschbaum-development/commentions

A package to allow you to create comments, tag users and more

12369.2k](/packages/kirschbaum-development-commentions)[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[tonysm/rich-text-laravel

Integrates Trix content with Laravel

46577.8k1](/packages/tonysm-rich-text-laravel)[codebar-ag/laravel-filament-json-field

A Laravel Filament JSON Field integration with CodeMirror support

1124.1k](/packages/codebar-ag-laravel-filament-json-field)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[defstudio/filament-column-length-limiter

Limit Filament columns length showing a tooltip when text exceeds

126.2k](/packages/defstudio-filament-column-length-limiter)

PHPackages © 2026

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