Skip to content
Calm motion: animations on this site only fade, with no movement

Balance card ​

The balance of an account, with the change and the main actions

Shows how much money an account holds, at the top of a bank or wallet screen. For any other single number, use the stat.

Basic
Studio account

Rp 18.450.000

+Rp 2.350.000 up · this month

Savings

$3,120.40

−$85.20 down · this week

  • label is the name of the account, and amount is the balance.
  • currency is an ISO 4217 code (default USD), and locale sets the format (default English).
  • change is the change over period, in the same currency. It shows with a sign and a word, such as "+$2.00 up". A drop is also red, but the sign and the word carry the meaning.
  • The eye button hides the amount and the change, for a screen that other people can see. v-model:masked holds that state. Screen readers hear "Hidden" in place of the amount.
  • Put buttons such as Transfer in the default slot.
  • Change the words with labels or a label pack: show, hide, hidden, up, and down.

Usage ​

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

API ​

Props

NameTypeDefaultDescription
label*string—the name of the account, for example "Main account"
amount*number—
currencystring"USD"ISO 4217 code, for example `IDR` or `USD`
localestring"en"
changenumber—the change over `period`, in the same currency
periodstring—the period of the change, for example "this month"
labelsPartial<{ show: string; hide: string; hidden: string; up: string; down: string; }>—
maskedbooleanfalsehide the amounts, for a screen that other people can see

Events

NamePayloadDescription
update:masked[value: boolean]

Slots

NameScopeDescription
default—

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