BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/lyse/tooltip

tooltip

lyse/tooltip
FreeComponent

lyse publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by lyse on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ui.getlyse.com/r/tooltip.json

Source

registry/new-york/ui/tooltip/tooltip.tsxui.getlyse.com/r/tooltip.json
1import * as React from "react"
2import * as TooltipPrimitive from "@radix-ui/react-tooltip"
3import { cva, type VariantProps } from "class-variance-authority"
4
5import { cn } from "@/lib/utils"
6import "./tooltip.css"
7
8const tooltipContentVariants = cva(
9 "tooltip-content z-50 flex items-center overflow-hidden font-accent animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
10 {
11 variants: {
12 size: {
13 md: "max-w-40 gap-[var(--layout-gap-sm)] p-[var(--layout-padding-md)] rounded-[var(--layout-radius-lg)] text-content-note",
14 sm: "max-w-40 gap-[var(--layout-gap-sm)] p-[var(--layout-padding-sm)] rounded-[var(--layout-radius-lg)] text-content-caption",
15 },
16 },
17 defaultVariants: {
18 size: "md",
19 },
20 }
21)
22
23function TooltipProvider({
24 delayDuration = 300,
25 ...props
26}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {
27 return (
28 <TooltipPrimitive.Provider
29 data-slot="tooltip-provider"
30 delayDuration={delayDuration}
31 {...props}
32 />
33 )
34}
35
36function Tooltip({
37 ...props
38}: React.ComponentProps<typeof TooltipPrimitive.Root>) {
39 return <TooltipPrimitive.Root {...props} />
40}
41
42function TooltipTrigger({
43 ...props
44}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {
45 return <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />
46}
47
48function TooltipContent({
49 className,
50 size,
51 sideOffset = 6,
52 children,
53 ...props
54}: React.ComponentProps<typeof TooltipPrimitive.Content> &
55 VariantProps<typeof tooltipContentVariants>) {
56 return (
57 <TooltipPrimitive.Portal>
58 <TooltipPrimitive.Content
59 data-slot="tooltip-content"
60 sideOffset={sideOffset}
61 className={cn(tooltipContentVariants({ size, className }))}
62 {...props}
63 >
64 {children}
65 </TooltipPrimitive.Content>
66 </TooltipPrimitive.Portal>
67 )
68}
69
70function TooltipShortcut({
71 className,
72 ...props
73}: React.ComponentProps<"kbd">) {
74 return (
75 <kbd
76 data-slot="tooltip-shortcut"
77 className={cn("tooltip-shortcut h-[var(--layout-size-sm)] shrink-0 text-content-caption", className)}
78 {...props}
79 />
80 )
81}
82
83export {
84 Tooltip,
85 TooltipTrigger,
86 TooltipContent,
87 TooltipProvider,
88 TooltipShortcut,
89 tooltipContentVariants,
90}

What it pulls in

npm packages

  • class-variance-authority
  • @radix-ui/react-tooltip

Other registry items

  • https://ui.getlyse.com/r/lyse-tokens.json

Files it writes

  • registry/new-york/ui/tooltip/tooltip.tsx
  • registry/new-york/ui/tooltip/tooltip.css

Facts

Registry
lyse
Type
registry:ui
Access
Free
Files written
2
Licence
MIT
First indexed
2026-08-04
Last confirmed
today

Go to the source

Docs on lyse ui.getlyse.com lyse-labs/lyse-registry on GitHub Raw registry item This item as JSON

More from lyse

All 33 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
action-cardaction-cardlyseComponentsFreeno deps · 2 files
alertalertlyseComponentsFree2 deps · 2 files
alert-dialogalert-dialoglyseComponentsFree2 deps · 2 files
avataravatarlyseComponentsFree3 deps · 2 files
badgebadgelyseComponentsFree1 dep · 2 files
banner-infobanner-infolyseComponentsFree2 deps · 2 files
breadcrumbbreadcrumblyseComponentsFree2 deps · 2 files
buttonbuttonlyseComponentsFree2 deps · 2 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex