diff --git a/docs/app/components/content/examples/input/InputMaskExample.vue b/docs/app/components/content/examples/input/InputMaskExample.vue new file mode 100644 index 00000000..4f8d9cd3 --- /dev/null +++ b/docs/app/components/content/examples/input/InputMaskExample.vue @@ -0,0 +1,14 @@ + + + diff --git a/docs/content/3.components/input.md b/docs/content/3.components/input.md index c76f37dc..becc8d08 100644 --- a/docs/content/3.components/input.md +++ b/docs/content/3.components/input.md @@ -278,6 +278,16 @@ name: 'input-kbd-example' This example uses the `defineShortcuts` composable to focus the Input when the :kbd{value="/"} key is pressed. :: +### With mask + +There's no built-in support for masks, but you can use librairies like [maska](https://github.com/beholdr/maska) to mask the Input. + +::component-example +--- +name: 'input-mask-example' +--- +:: + ### With floating label You can use the `#default` slot to add a floating label to the Input. diff --git a/docs/package.json b/docs/package.json index f37e6887..3fea2848 100644 --- a/docs/package.json +++ b/docs/package.json @@ -21,6 +21,7 @@ "ai": "^4.3.16", "capture-website": "^4.2.0", "joi": "^17.13.3", + "maska": "^3.1.1", "motion-v": "^1.1.1", "nuxt": "^3.17.5", "nuxt-component-meta": "^0.11.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1110846b..cdf26781 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -278,6 +278,9 @@ importers: joi: specifier: ^17.13.3 version: 17.13.3 + maska: + specifier: ^3.1.1 + version: 3.1.1 motion-v: specifier: ^1.1.1 version: 1.1.1(react@19.1.0)(vue@3.5.16(typescript@5.8.3)) @@ -5128,6 +5131,9 @@ packages: marky@1.3.0: resolution: {integrity: sha512-ocnPZQLNpvbedwTy9kNrQEsknEfgvcLMvOtz3sFeWApDq1MXH1TqkCIx58xlpESsfwQOnuBO9beyQuNGzVvuhQ==} + maska@3.1.1: + resolution: {integrity: sha512-68ZJfZ6/YANwv7CufbQmcCNoHdJnIRxuQgZtSFZe5ltlmZ15ZdA01siUGLh9EfaUX65DN0l/A7g+o2xjTICeGQ==} + math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} @@ -12933,6 +12939,8 @@ snapshots: marky@1.3.0: {} + maska@3.1.1: {} + math-intrinsics@1.1.0: {} mdast-util-find-and-replace@3.0.2: