Skip to content

🚀 - Support dynamic mask #1174

Open
@splincode

Description

Which package(s) are relevant/related to the feature request?

@maskito/kit

Description

Dynamic mask automatically selects appropriate mask from provided array of masks. Mask with the largest number of fitting characters is selected considering provided masks order.

<input name="color" [maskito]="maskitoOptions" />
class Example {
 readonly maskitoOptions = [
   { mask: ['#', ...new Array(6).fill(/[0-9a-f]/i)] },
   { mask: /^rgb\((\d+),(\d+),(\d+)\)$/ },
 ];
}

What do you think?

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or request

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions