Files
ui/apps/ui.hanzo.ai/examples/interactive-grid-pattern.tsx
zeekayandHanzo Dev bf9fbd156f Document the whole library from its own source
The docs site renders every component the barrel names, the gallery
harvests rules for all of them, and the pages come from the packages
rather than a hand-kept copy.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-07 18:59:54 -07:00

37 lines
1.2 KiB
TypeScript

import { YStack } from "@hanzo/gui"
import { InteractiveGridPattern } from "@hanzo/ui"
/** Default — a 24x24 board of 40px cells, lighting up under the pointer. */
export function Default() {
return (
<YStack width="100%" overflow="hidden" borderWidth={1} borderColor="$borderColor">
<InteractiveGridPattern squares={[24, 24]} width={40} height={40} />
</YStack>
)
}
/** Small cells — a denser board reads as a texture rather than a puzzle. */
export function SmallCells() {
return (
<YStack width="100%" overflow="hidden" borderWidth={1} borderColor="$borderColor">
<InteractiveGridPattern squares={[40, 20]} width={16} height={16} idleColor="transparent" hoverColor="currentColor" />
</YStack>
)
}
/** Tinted — idle cells carry a faint fill, so the whole board reads before any hover. */
export function Tinted() {
return (
<YStack width="100%" overflow="hidden" borderWidth={1} borderColor="$borderColor">
<InteractiveGridPattern
squares={[16, 10]}
width={32}
height={32}
idleColor="rgba(128, 128, 128, 0.08)"
hoverColor="rgba(128, 128, 128, 0.4)"
strokeColor="currentColor"
/>
</YStack>
)
}