Command Palette
Search for a command to run

Underline To Background

Expand an underline into a full background fill while transitioning the text color.

motion-sv

Weeklygoodiesdeliveredstraighttoyourinbox subscribe

Installation

pnpm dlx shadcn-svelte@latest add http://sveltekit-prerender/f/underline-to-background.json
Visit Original Docs

For more deeper understaing visit fancy components documentation.

Props

PropTypeDefaultDescription
childrenSnippetundefinedSnippet content displayed inside the animated underline/fill treatment.
askeyof SvelteHTMLElements"span"HTML element used for the hoverable text wrapper.
transitionTransition{ type: "spring", damping: 30, stiffness: 300 }Motion transition used for both the underline growth and text-color change.
targetTextColorstring"#fef"Text color applied while the underline has expanded into the background.
underlineHeightRationumber0.1Ratio of the current font size used as the resting underline thickness.
underlinePaddingRationumber0.01Ratio of the current font size used to offset the underline below the text baseline.
classstringundefinedClasses merged onto the motion-enabled wrapper element.