useInteractiveRole — One Tile, Four Roles
- from @astryx
- by Astryx
A polymorphic Tile used four ways: with an href it renders as a link, with an onClick as a button, with neither as plain content, and placed as a Popover trigger it becomes the trigger button through context — the resolution order in one place.
Install
New to shadcn? Set up your project
If your project already has a shadcn components.json, skip initialization. Otherwise, run this once from your project root.
pnpm dlx shadcn@latest initpnpm dlx shadcn@latest add @astryx/example-use-interactive-role-one-tile-four-rolesRegistry dependencies0
The CLI adds no other registry items with this one.
