dynamic-scratch-reveal
Reactive icon

Dynamic Scratch Reveal

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 18 Mar (12 hours ago)
 by 
EONE TECHNOLOGIES PRIVATE LIMITED
0.0
 (0 ratings)
dynamic-scratch-reveal

Dynamic Scratch Reveal

Documentation
1.0.0

Key Features

  • Fixed & Flexible Dimensions: Set specific Width and Height parameters to match your UI design perfectly.

  • Smart Instructional Text: * Auto-Centering: No manual X/Y coordinates needed; the "Scratch Here" label stays perfectly centered.

    • Text Area Styling: Control FontSize, FontColor, and TextBackgroundColor.

    • Enhanced Padding: Built-in vertical and horizontal padding (20px/25px) ensures your instructions look like a modern UI button, not cramped text.

  • Interactive "Treasure" Placeholder: Drop any OutSystems content (Images, Expressions, or Blocks) into the placeholder. The scratch layer sits perfectly on top.

  • Customizable Threshold: Set a Threshold percentage (e.g., 50%) to automatically trigger a "Success" event once the user has revealed enough of the card.

  • Mobile-First Design: Optimized touch-event handling prevents accidental page scrolling while the user is interacting with the scratch area.

  • Performance Optimized: Uses willReadFrequently and efficient pixel sampling to ensure high performance on both desktop and mobile devices.


Technical Input Parameters

ParameterTypeDescription
CanvasIdTextThe unique Runtime ID of the Canvas element.
Width / HeightIntegerThe fixed dimensions of your scratch card in pixels.
CoverColorTextThe hex or CSS color of the scratchable surface.
DisplayTextTextThe "Scratch Here" hint text drawn on the cover.
FontSize / FontColorMixedControls the typography of the hint text.
TextBackgroundColorTextThe color of the highlight box behind the text area.
BrushSizeIntegerThe thickness of the scratch stroke.
ThresholdIntegerPercentage (1-100) of area to be cleared before triggering the event.

How to Implement

  1. Placement: Drag the ScratchCard block onto your Screen.

  2. Content: Place your reward (e.g., a "20% OFF" Image) inside the Content placeholder.

  3. Styling: Provide a CoverColor (e.g., "#C0C0C0" for Silver) and set your DisplayText