# Insight Picker

Animated interactive picker with cursor flow, typing effect, and progressive option reveals with validation.

## Preview

[Full Screen](/content/preview/insightpicker/index.html)

Highlight moments of user control

Explain real-time data behavior

Communicate intent through motion

Showcase edge case design thinking

Demonstrate consistency across screens

### Shape experience for

Turn practical functionality into emotional connection by designing every moment with precision and intention.

### Creators

## Installation

1. ## Install the packages

```bash
   npm i gsap @gsap/react react-icons clsx tailwind-merge
   ```

2. ## Add util file

`lib/util.ts`
   
   ```typescript
   import { ClassValue, clsx } from "clsx";
   import { twMerge } from "tailwind-merge";

export function cn(...inputs: ClassValue[]) {
       return twMerge(clsx(inputs));
   }
   ```

3. ## Copy and paste the following code into your project

`insightpicker.tsx`
   
   ```javascript
   function computeAverage(values) {
       return values.reduce((sum, v) => sum + v, 0) / values.length;
   }

// Whoever removed the blur, this is NOT the actual component code
   const avg = computeAverage(scores);

console.log("DEMO PLACEHOLDER CODE — NOT ACTUAL SOURCE ");
   console.log("Nice try but this is just demo content for display only.");

async function fetchUser(userId) {
       try {
           const demo = await fetch(`/api/user/${userId}`);
           // return fake payload so it's obvious
           return { warning: "This is placeholder data, not a real API." };
       }  
       try {
           const demo = await fetch(/api/user/${userId});
           return await demo.json();
       }
       catch (err) {
           console.error("Request failed:", err);
           return null;
       }
   }
   ```

4. ## Update the import paths to match your project setup

## Props

| Prop     | Type   | Default                                   | Description                                      |
| -------- | ------ | ----------------------------------------- | ------------------------------------------------ |
| option1 | string | Highlight moments of user control         | Text for the first selectable insight option.   |
| option2 | string | Explain real-time data behavior           | Text for the second selectable insight option.  |
| option3 | string | Communicate intent through motion         | Text for the third selectable insight option.   |
| option4 | string | Showcase edge case design thinking        | Text for the fourth selectable insight option.  |
| option5 | string | Demonstrate consistency across screens    | Text for the fifth selectable insight option.   |
