Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA like button that answers at once: a toggle with a stable name, an immediate count change, a rollback with an announced message when saving fails and a lock while saving.
Derived from this item’s props table, because it declares no controls of its own. This item has no standalone playground, so changes update the code, the share link and the AI prompt.
Use this for likes, bookmarks and favourites where the server can fail and the interface should still feel instant.
Do not use it for votes that must be exact in real time, or where the count needs to be live from other people.
This item is part of tealmac UI Pro
The source for this item installs with a Pro licence key. Log in with your key to see the install command, or read the Pro setup page.
| Prop | Type | Default | Description |
|---|---|---|---|
liked | boolean | - | Whether the person liked it. |
count | number | - | Total likes including the person's. |
onToggle | (liked: boolean) => Promise<void> | - | Save; reject to roll back. |
noun | string | post | Used in the accessible name. |
aria-pressed and its name stays "Like article", so the control is not re-announced as a different button after each press; the count is visual and the result is in a polite status.| Key | Action |
|---|---|
| Enter or Space | toggles the like |
The pattern ships a Testing Library test (toggle-like-counter.test.tsx) that covers the toggle state and count, optimistic updates, unliking, rollback and the saving lock.