Breaking convention in Skeleton, this component is provided “headless”. Meaning no default styles are applied out of the box. This ensures you retain full control of all styling for maximum flexibility.
Arrow
Visually connects the popover content to the trigger element. Will automatically align based on the selected side.
Z-Index
By default Skeleton does not take an opinionated stance regarding z-index stacking. The result is the component can sometimes be occluded beneath other elements with a higher index. The Z-Index can controlled by applying a utility class to the Positioner component.
Provider Pattern
Use the Provider Pattern to gain access to the inner component APIs.
Direction
Set the text direction (ltr or rtl) using the dir prop.
Anatomy
Here’s an overview of how the Tooltip component is structured in code:
import { Tooltip, Portal } from '@skeletonlabs/skeleton-react';
export default function Anatomy() {
return (
<Tooltip>
<Tooltip.Trigger />
<Portal>
<Tooltip.Positioner>
<Tooltip.Content>
<Tooltip.Arrow>
<Tooltip.ArrowTip />
</Tooltip.Arrow>
</Tooltip.Content>
</Tooltip.Positioner>
</Portal>
</Tooltip>
);
}<script lang="ts">
import { Tooltip, Portal } from '@skeletonlabs/skeleton-svelte';
</script>
<Tooltip>
<Tooltip.Trigger />
<Portal>
<Tooltip.Positioner>
<Tooltip.Content>
<Tooltip.Arrow>
<Tooltip.ArrowTip />
</Tooltip.Arrow>
</Tooltip.Content>
</Tooltip.Positioner>
</Portal>
</Tooltip>API Reference
Unable to load component information for react/tooltip
Unable to load component information for svelte/tooltip