This is insanely verbose just for a button with a tooltip: import { Button } from "@/components/ui/button" import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "@/components/ui/tooltip" export default function TooltipDemo() { return ( <TooltipProvider> <Tooltip> <TooltipTrigger render={<Button variant="noShadow" />}> Hover </TooltipTrigger> <TooltipContent> <p>Add to library</p> </TooltipContent> </Tooltip> </TooltipProvider> ) } Contrast with plain old HTML form button where the title attribute gives the tooltip text: <button type="submit" title="Add to library!">Hover</button>
Yeah but can your tooltip render in neon brown?
Not sure; it may be doable remotely with some CSS, in which case it would be a few lines of code for any number of buttons.
1 reply
Joking aside, I don’t believe you can and I’m fine with that. It’s still so much simpler and predictable.
Haven’t you heard that you’re not supposed to type code anymore?
