Calm motion: animations on this site only fade, with no movement
Follow button
Follow and unfollow, with the count of followers
Lets a reader follow a person, a page, or a show. Put it on a profile card or a group card.
Basic
12.5K followers832 followers2,3 jt followers
vue
<template>
<div style="display: grid; gap: 12px; justify-items: start">
<BlessFollowButton v-model="studio" name="Home Studio" :followers="12480" />
<BlessFollowButton v-model="ana" name="Ana Putri" :followers="831" />
<BlessFollowButton name="Radio Kita" :followers="2310000" locale="id-ID" />
</div>
</template>
<script setup lang="ts">
import { ref } from "vue";
import { BlessFollowButton } from "blessing-ui";
const studio = ref(false);
const ana = ref(true);
</script>v-modelis true when the reader follows.nameis the person or page. Screen readers hear it after the words, such as "Follow: Ana Putri". The words change to "Following", so the button has no pressed state.- Not following is a filled button with "+ Follow". Following is an outline with "✓ Following". The shape and the words change, not only the color.
followersis the count without the reader. While the reader follows, the count is one more. It shows in short form, such as "12.5K", in thelocale.- After a click, a hidden status line says that the reader follows the person or no longer follows them.
- Change the words with
labelsor a label pack:follow,following, and the functionsfollowers,followed, andunfollowed.
Usage
ts
import { BlessFollowButton } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
name* | string | — | the person or page to follow, for screen readers |
followers | number | — | the number of followers, without the reader |
locale | string | "en" | |
labels | Partial<{ follow: string; following: string; followers: (count: string) => string; followed: (name: string) => string; unfollowed: (name: string) => string; }> | — | |
modelValue | boolean | false |
Events
| Name | Payload | Description |
|---|---|---|
update:modelValue | [value: boolean] |