From 2074cf7cd91e3069e26d2ce0b6afdf4ff443476f Mon Sep 17 00:00:00 2001 From: bender Date: Fri, 17 Apr 2026 21:18:59 +0000 Subject: [PATCH] Switch to version 2: added registry/components/TextNumberCount.json --- registry/components/TextNumberCount.json | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 registry/components/TextNumberCount.json diff --git a/registry/components/TextNumberCount.json b/registry/components/TextNumberCount.json new file mode 100644 index 0000000..75acdc6 --- /dev/null +++ b/registry/components/TextNumberCount.json @@ -0,0 +1,40 @@ +{ + "name": "TextNumberCount", + "description": "Animated number counter that increments smoothly from a start to an end value.", + "details": "Use for statistics, or metrics where a counting animation adds emphasis. Numbers animate on mount or when scrolled into view. Supports decimals, currency, and optional suffix/prefix.", + "constraints": { + "numberRules": { + "value": { + "required": true, + "example": 99.99 + }, + "startFrom": { + "required": false, + "example": 0 + } + } + }, + "propsSchema": { + "value": "number", + "startFrom?": "number", + "duration?": "number", + "format?": "Intl.NumberFormatOptions", + "locales?": "string", + "prefix?": "string", + "suffix?": "string", + "animateOnScroll?": "boolean", + "threshold?": "number", + "className?": "string" + }, + "usageExample": "", + "do": [ + "Use for statistics displays", + "Use for achievement showcases" + ], + "dont": [], + "editRules": { + "textOnly": true, + "layoutLocked": true, + "styleLocked": true + } +}