# Tooltip A versatile Tooltip, managing state, context, and styling. ```jsx featured This is the help ``` ```css preview .tooltip-content[data-variant] { position: relative; border-radius: min(32px, var(--lcs-radius, 0px)); padding: calc(4px * var(--lcs-spacing, 1)) calc(8px * var(--lcs-spacing, 1)); &[data-variant="solid"] { background-color: rgb(var(--surface-1)); border: 1px solid transparent; } &[data-variant="outlined"] { background-color: rgba(var(--surface-1), 0.8); border: 1px solid rgba(var(--color, var(--border-1))); } &[data-variant="muted"] { background-color: rgba(var(--surface-1), 0.6); border: 1px solid transparent; } } ``` [View Source](https://github.com/LocusInc/locus-ui/tree/main/packages/locus-ui/src/components/tooltip) ## Anatomy ```jsx code no-header ``` ## Examples ### Variants Tooltip content comes with three built in variants, `solid`, `outlined`, and `muted`. ```jsx {["solid", "outlined", "muted"].map((variant) => ( {variant.charAt(0).toUpperCase() + variant.slice(1)} Tooltip ))} ``` ### Sides The `side` prop controls which side of the trigger the tooltip appears on: `top`, `right`, `bottom`, or `left`. ```jsx {["top", "right", "bottom", "left"].map((side) => ( {side.charAt(0).toUpperCase() + side.slice(1)} Tooltip ))} ``` ### Open on Click The `openOnClick` prop enables opening the tooltip by clicking the trigger instead of hovering. ```jsx Opened by click ``` ### Delay The `delay` prop controls the hover delay in milliseconds before the tooltip opens. ```jsx {[0, 300, 1000].map((delay) => ( {delay}ms delay ))} ```