PHPackages                             agungsp/filament-cleave-input - 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. agungsp/filament-cleave-input

ActiveLibrary

agungsp/filament-cleave-input
=============================

This is my package filament-cleave-input

v0.1.1-beta(1mo ago)01↑2900%MITPHPPHP ^8.1CI passing

Since Mar 27Pushed 1mo agoCompare

[ Source](https://github.com/agungsp/filament-cleave-input)[ Packagist](https://packagist.org/packages/agungsp/filament-cleave-input)[ Docs](https://github.com/agungsp/filament-cleave-input)[ GitHub Sponsors](https://github.com/agungsp)[ RSS](/packages/agungsp-filament-cleave-input/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (15)Versions (4)Used By (0)

Filament Cleave Input
=====================

[](#filament-cleave-input)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c691103a3cb752934d12c95350b10bffec72d7b07cfa0c28ec9f4b0e625f4570/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6167756e6773702f66696c616d656e742d636c656176652d696e7075742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/agungsp/filament-cleave-input)[![GitHub Tests Action Status](https://camo.githubusercontent.com/99d0cd961ae3b1242e03c43364affcc75d2dce2b8f91a685c3bed9ecd620091c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6167756e6773702f66696c616d656e742d636c656176652d696e7075742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/agungsp/filament-cleave-input/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/2c43b5ede4f06966ad81de424ea6521d88706d87982813884e3f6a5f64ef1740/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6167756e6773702f66696c616d656e742d636c656176652d696e7075742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/agungsp/filament-cleave-input/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/ea506be57ba86070ee4663e87d9aa97dd5c8d00d09c565c4e25c01ad5871040d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6167756e6773702f66696c616d656e742d636c656176652d696e7075742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/agungsp/filament-cleave-input)

A powerful Cleave.js (using `cleave-zen`) input masking component for Filament v3. This package provides a native Filament-like developer experience to enforce input formatting rules, such as credit card numbers, phone numbers, dates, times, and numeral formatting. State unformatting is automatically handled before hydrating the form state to backend.

Requirements
------------

[](#requirements)

- PHP 8.1+
- Filament v3.0+

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

[](#installation)

You can install the package via composer:

```
composer require agungsp/filament-cleave-input
```

Optionally, you can publish the views using:

```
php artisan vendor:publish --tag="filament-cleave-input-views"
```

Usage
-----

[](#usage)

Simply use the `CleaveInput` component in your Filament Forms schema.

```
use Agungsp\FilamentCleaveInput\Forms\Components\CleaveInput;

CleaveInput::make('card_number')
    ->creditCard()
    ->label('Credit Card Number');
```

### Credit Card

[](#credit-card)

```
CleaveInput::make('credit_card')
    ->creditCard()
```

### Numeral Formatting

[](#numeral-formatting)

```
use Agungsp\FilamentCleaveInput\Enums\NumeralThousandGroupStyle;

CleaveInput::make('price')
    ->numeral()
    ->numeralThousandsGroupStyle(NumeralThousandGroupStyle::THOUSAND) // or 'thousand', 'lakh', 'wan', 'none'
    ->numeralDecimalMark(',')
    ->numeralDecimalScale(2)
    ->numeralIntegerScale(5)
    ->numeralPositiveOnly()
    ->stripLeadingZeroes()
```

### Date

[](#date)

```
use Agungsp\FilamentCleaveInput\Enums\DateUnit;

CleaveInput::make('date_of_birth')
    ->date()
    ->datePattern([DateUnit::YEAR, DateUnit::MONTH, DateUnit::DAY]) // or ['Y', 'm', 'd']
    ->dateMin('2000-01-01')
    ->dateMax('2024-12-31')
```

### Time

[](#time)

```
use Agungsp\FilamentCleaveInput\Enums\TimeUnit;
use Agungsp\FilamentCleaveInput\Enums\TimeFormat;

CleaveInput::make('time')
    ->time()
    ->timePattern([TimeUnit::HOUR, TimeUnit::MINUTE]) // or ['h', 'm']
    ->timeFormat(TimeFormat::TWELVE) // or '12', '24'
```

### Custom Blocks

[](#custom-blocks)

```
CleaveInput::make('phone')
    ->blocks([4, 3, 3, 4])
    ->delimiter('-')
    ->uppercase()
    ->numericOnly()
```

Available Methods
-----------------

[](#available-methods)

The component ships with extensive configuration methods mapped to `cleave-zen`'s JavaScript configuration options:

### Mask Types

[](#mask-types)

- `creditCard()`
- `numeral(bool $enabled = true)`
- `date(bool $enabled = true)`
- `time(bool $enabled = true)`

### Numeral Options

[](#numeral-options)

- `numeralThousandsGroupStyle(\Agungsp\FilamentCleaveInput\Enums\NumeralThousandGroupStyle | string $style)`
- `numeralIntegerScale(int $scale)`
- `numeralDecimalScale(int $scale)`
- `numeralDecimalMark(string $mark)`
- `numeralPositiveOnly(bool $positiveOnly = true)`
- `stripLeadingZeroes(bool $strip = true)`

### Date Options

[](#date-options)

- `datePattern(array $pattern)`
- `dateMin(string $min)`
- `dateMax(string $max)`

### Time Options

[](#time-options)

- `timePattern(array $pattern)`
- `timeFormat(\Agungsp\FilamentCleaveInput\Enums\TimeFormat | string $format)`

### Generic &amp; Custom Block Options

[](#generic--custom-block-options)

- `blocks(array $blocks)`
- `delimiter(string $delimiter)`
- `delimiters(array $delimiters)`
- `uppercase(bool $uppercase = true)`
- `lowercase(bool $lowercase = true)`
- `numericOnly(bool $numericOnly = true)`
- `cleavePrefix(string $prefix)`
- `tailPrefix(bool $tail = true)`

### Advanced Options

[](#advanced-options)

- `cleaveOptions(array $options)`: Override or inject raw JS options directly into the `cleave-zen` configuration block.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Agung Setyo Pribadi](https://github.com/agungsp)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 Bus Factor1

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

45d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelagungspfilament-cleave-input

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/agungsp-filament-cleave-input/health.svg)

```
[![Health](https://phpackages.com/badges/agungsp-filament-cleave-input/health.svg)](https://phpackages.com/packages/agungsp-filament-cleave-input)
```

###  Alternatives

[codewithdennis/filament-select-tree

The multi-level select field enables you to make single selections from a predefined list of options that are organized into multiple levels or depths.

320392.1k17](/packages/codewithdennis-filament-select-tree)[ralphjsmit/laravel-filament-components

A collection of reusable components for Filament.

10972.2k2](/packages/ralphjsmit-laravel-filament-components)[rawilk/filament-password-input

Enhanced password input component for filament.

52232.4k3](/packages/rawilk-filament-password-input)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[schmeits/filament-character-counter

This is a Filament character counter TextField and Textarea form field for Filament v4 and v5

33184.7k6](/packages/schmeits-filament-character-counter)[defstudio/filament-searchable-input

A searchable autocomplete input for Filament forms

3212.4k](/packages/defstudio-filament-searchable-input)

PHPackages © 2026

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