# ContactCard ### Intro Display contact information in the form of cards. ### Install Register component globally via `app.use`, refer to [Component Registration](#/en-US/advanced-usage#zu-jian-zhu-ce) for more registration ways. ```js import { createApp } from 'vue'; import { ContactCard } from 'vant'; const app = createApp(); app.use(ContactCard); ``` ## Usage ### Add Contact ```html ``` ```js import { Toast } from 'vant'; export default { setup() { const onAdd = () => Toast('add'); return { onAdd, }; }, }; ``` ### Edit Contact ```html ``` ```js import { reactive } from 'vue'; import { Toast } from 'vant'; export default { setup() { const currentContact = reactive({ name: 'John Snow', tel: '13000000000', }); const onEdit = () => Toast('edit'); return { onEdit, currentContact, }; }, }; ``` ### Uneditable ```html ``` ## API ### Props | Attribute | Description | Type | Default | | --------- | -------------------- | -------- | ------------------ | | type | Can be set to `edit` | _string_ | `add` | | name | Name | _string_ | - | | tel | Phone | _string_ | - | | add-text | Add card text | _string_ | `Add contact info` | ### Events | Event | Description | Arguments | | ----- | --------------------------------- | ------------------- | | click | Emitted when component is clicked | _event: MouseEvent_ | ### CSS Variables The component provides the following CSS variables, which can be used to customize styles. Please refer to [ConfigProvider component](#/en-US/config-provider). | Name | Default Value | Description | | --- | --- | --- | | --van-contact-card-padding | _var(--van-padding-md)_ | - | | --van-contact-card-add-icon-size | _40px_ | - | | --van-contact-card-add-icon-color | _var(--van-blue)_ | - | | --van-contact-card-value-line-height | _var(--van-line-height-md)_ | - |