3.11.4 • Published 3 months ago

@baloise/web-app-form-vue v3.11.4

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
3 months ago

@baloise/web-form-vue

Continuous Release npm npm bundle size npm GitHub GitHub issues

Delivers utility components to create forms that follow the guides of the Baloise Design System. Moreover it extends the useField function to work as smooth as possible with the Baloise Design System and defines Baloise specific yup schema validations.

Installation

For Vue we use the library VeeValidate together with the Yup Schema Validation.

npm install @baloise/web-app-form-vue vee-validate@next yup
import { baloiseForm } from '@baloise/web-app-form-vue'
import App from './App.vue'

createApp(App).use(baloiseForm).mount('#app')

Define Form Field

Instead of using the useField from Vee-Validate use the wrapper useBalField. This extends the Vee-Validate implementation with the property invalid and message from the yup schema validations.

<script setup lang="ts">
import { BalInput, BalField, BalFieldLabel, BalFieldControl, BalFieldMessage } from '@baloise/design-system-components-vue'
import { useBalField } from '@baloise/web-app-form-vue'

const { value, message, invalid } = useBalField<string>('firstname')
</script>

<template>
  <BalField :invalid="invalid">
    <BalFieldLabel>My Label</BalFieldLabel>
    <BalFieldControl>
      <BalInput v-model="value" />
    </BalFieldControl>
    <BalFieldMessage>{{ message }}</BalFieldMessage>
  </BalFie>
</template>
3.11.4

3 months ago

3.11.3

4 months ago

3.11.2

8 months ago

3.11.0

1 year ago

3.10.1

1 year ago

3.10.0

1 year ago

3.11.1

1 year ago

3.9.0

1 year ago

3.7.1-beta.302

1 year ago

3.7.1-beta.304

1 year ago

3.7.1-beta.303

1 year ago

3.7.1-beta.305

1 year ago

3.7.3

1 year ago

3.6.4

2 years ago

3.7.2

1 year ago

3.6.3

2 years ago

3.7.2-beta.1

1 year ago

3.8.0

1 year ago

3.7.1

1 year ago

3.7.0

2 years ago

3.6.2

2 years ago

3.6.1

2 years ago

3.6.0

2 years ago

3.5.0

2 years ago

3.3.2-beta.24

2 years ago

3.3.2-beta.23

2 years ago

3.3.2-beta.22

2 years ago

3.3.2-beta.20

2 years ago

3.3.2-beta.19

2 years ago

3.3.2-beta.18

2 years ago

3.3.2-beta.17

2 years ago

3.3.2-beta.16

2 years ago

3.3.2-beta.14

2 years ago

3.3.2-beta.13

2 years ago

3.3.2-beta.9

2 years ago

3.3.2-beta.8

2 years ago

3.3.2-beta.7

2 years ago

3.3.2-beta.6

2 years ago

3.3.2-beta.5

2 years ago

3.3.2-beta.4

2 years ago