Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toggle
- Toggle Group
- Tooltip
- Typography
Get Started
@shadcn/react
@shadcn/helpers
Force UI registry
Utilities
Installation#
pnpm dlx shadcn@latest add @force-ui-svelte/tooltip
Usage#
The Tooltip.Provider component should be placed once in your root layout, wrapping all content that will contain tooltips. This ensures that only one tooltip within the provider can be open at a time.
<script lang="ts">
import * as Tooltip from "$lib/components/ui/tooltip/index.js";
let { children } = $props();
</script><Tooltip.Provider>
{@render children()}
</Tooltip.Provider>Then use tooltips anywhere in your app:
<script lang="ts">
import * as Tooltip from "$lib/components/ui/tooltip/index.js";
</script>
<Tooltip.Root>
<Tooltip.Trigger>Hover</Tooltip.Trigger>
<Tooltip.Content>
<p>Add to library</p>
</Tooltip.Content>
</Tooltip.Root>Composition#
Use the following composition to build a Tooltip:
Tooltip.Provider
└── Tooltip.Root
├── Tooltip.Trigger
└── Tooltip.ContentExamples#
Side#
Use the side prop to change the position of the tooltip.
With Keyboard Shortcut#
Disabled Button#
Show a tooltip on a disabled button by wrapping it with a span.
RTL#
To enable RTL support in Force UI, see the RTL configuration guide.
API Reference#
See the Radix Tooltip documentation.
Deploy your shadcn/ui app on Vercel
Trusted by OpenAI, Sonos, Adobe, and more.
Vercel provides tools and infrastructure to deploy apps and features at scale.
Deploy to Vercel