MCPcopy Create free account
hub / github.com/Remocn/remocn / CursorExampleScene

Function CursorExampleScene

components/docs/examples/cursor-example.tsx:23–57  ·  view source on GitHub ↗
(p: CursorExampleProps = {})

Source from the content-addressed store, hash-verified

21] as const;
22
23export const CursorExampleScene = (p: CursorExampleProps = {}) => {
24 const cursorStyle = useCursorPath([
25 { at: 0, x: 80, y: 60 },
26 { at: 40, x: BTN_X, y: BTN_Y, duration: 28 },
27 { at: 72, x: BTN_X, y: BTN_Y, click: true, duration: 0 },
28 ]);
29
30 const buttonStyle = useButtonTransition([
31 { at: 40, state: "hover", duration: 16 },
32 { at: 68, state: "press", duration: 8 },
33 { at: 76, state: "loading", duration: 6 },
34 { at: 108, state: "success", duration: 16 },
35 ]);
36
37 return (
38 <div style={{ position: "relative", width: "100%", height: "100%" }}>
39 <div
40 style={{
41 position: "absolute",
42 left: "50%",
43 top: "50%",
44 transform: "translate(-50%, -50%)",
45 }}
46 >
47 <Button label="Continue" style={buttonStyle} />
48 </div>
49 <Cursor
50 style={cursorStyle}
51 variant={p.variant ?? "arrow"}
52 size={p.size ?? 28}
53 rippleColor={p.rippleColor}
54 />
55 </div>
56 );
57};
58
59export const cursorExampleCode = (
60 values: Record<string, unknown> = {},

Callers

nothing calls this directly

Calls 2

useCursorPathFunction · 0.90
useButtonTransitionFunction · 0.90

Tested by

no test coverage detected