Tooltip
octane/tooltipFreeComponent
octane publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by octane on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/tooltip.jsonSource
1// Base UI base tooltip — runs on @octanejs/base-ui's Tooltip.2//3// SAME TWO POSITIONING DIFFERENCES AS POPOVER: the transform-origin var is plain4// `--transform-origin` rather than radix's `--radix-tooltip-content-transform-origin`, and the5// tree gains a Positioner layer (Portal > Positioner > Popup) which owns the offset.6//7// ONE RADIX-ONLY STATE IS DROPPED. The radix base styles `data-[state=delayed-open]:` alongside8// `data-open:`, because radix distinguishes an immediate open from one that waited out the9// delay. Base UI publishes only `data-open`/`data-closed` — there is no delayed-open state to10// match, so those three utilities would be dead weight referencing an attribute that never11// appears. The `data-open:` variants they duplicate are kept and cover both cases.12//13// UNVERIFIED PROVENANCE: class strings come from this package's radix base rather than14// transcribed from upstream's Base UI source.15import { createElement, Fragment, type OctaneNode } from 'octane';16import { Tooltip as TooltipPrimitive } from '@octanejs/base-ui/tooltip';1718import { cn } from '@/lib/utils';1920export interface TooltipProviderProps extends Record<string, unknown> {21 delay?: number;22}2324export function TooltipProvider({ delay = 0, ...props }: TooltipProviderProps) @{25 <TooltipPrimitive.Provider data-slot="tooltip-provider" delay={delay} {...props} />26}2728export function Tooltip(props: Record<string, unknown>) @{29 <TooltipPrimitive.Root data-slot="tooltip" {...props} />30}3132export function TooltipTrigger(props: Record<string, unknown>) @{33 <TooltipPrimitive.Trigger data-slot="tooltip-trigger" {...props} />34}3536export interface TooltipContentProps extends Record<string, unknown> {37 className?: string;38 sideOffset?: number;39 children?: OctaneNode;40}4142export interface BaseUiPositioningProps {43 /** Forwarded to the Positioner; see the note at the top of this file. */44 side?: 'top' | 'right' | 'bottom' | 'left';45 sideOffset?: number;46 align?: 'start' | 'center' | 'end';47 alignOffset?: number;48 anchor?: unknown;49 positionMethod?: 'absolute' | 'fixed';50 collisionBoundary?: unknown;51 collisionPadding?: unknown;52 collisionAvoidance?: unknown;53 arrowPadding?: number;54 sticky?: boolean;55 disableAnchorTracking?: boolean;56}5758export function TooltipContent({59 className,60 sideOffset = 0,61 align,62 side,63 alignOffset,64 anchor,65 positionMethod,66 collisionBoundary,67 collisionPadding,68 collisionAvoidance,69 arrowPadding,70 sticky,71 disableAnchorTracking,72 children,73 ...props74// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from octane
All 44 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | octane | Components | Free | 2 deps | |
| Alertalert | octane | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | octane | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | octane | Components | Free | no deps | |
| Avataravatar | octane | Components | Free | 1 dep | |
| Badgebadge | octane | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | octane | Components | Free | 1 dep | |
| Buttonbutton | octane | Components | Free | 2 deps |
