Skip to content
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
  • v-model is true when the reader follows.
  • name is 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.
  • followers is the count without the reader. While the reader follows, the count is one more. It shows in short form, such as "12.5K", in the locale.
  • After a click, a hidden status line says that the reader follows the person or no longer follows them.
  • Change the words with labels or a label pack: follow, following, and the functions followers, followed, and unfollowed.

Usage ​

ts
import { BlessFollowButton } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
name*string—the person or page to follow, for screen readers
followersnumber—the number of followers, without the reader
localestring"en"
labelsPartial<{ follow: string; following: string; followers: (count: string) => string; followed: (name: string) => string; unfollowed: (name: string) => string; }>—
modelValuebooleanfalse

Events

NamePayloadDescription
update:modelValue[value: boolean]

Released under the MIT License. Character names and artwork belong to their owners.