Release notes
This release adds six text effects. Read the migration guide before you upgrade, or browse the full changelog first.
A link with an animated underline in five styles, including a hand drawn scribble. Shows on hover, on keyboard focus, and for the current page.
<ul class="grid gap-3 text-base font-medium text-ink">
<li><x-markas.underline-link href="#">Grow from the center</x-markas.underline-link></li>
<li><x-markas.underline-link href="#" variant="slide">Slide in from the left</x-markas.underline-link></li>
<li><x-markas.underline-link href="#" variant="comes-in-goes-out">Comes in, goes out</x-markas.underline-link></li>
<li><x-markas.underline-link href="#" variant="goes-out-comes-in">Goes out, comes in</x-markas.underline-link></li>
<li><x-markas.underline-link href="#" variant="scribble">Drawn by hand</x-markas.underline-link></li>
</ul><header class="flex items-center justify-between rounded-xl border border-line bg-surface px-5 py-3">
<span class="text-sm font-semibold text-ink">Kopi Kita</span>
<nav aria-label="Main" class="flex items-center gap-5 text-sm font-medium text-muted">
<x-markas.underline-link href="#" variant="comes-in-goes-out" active class="text-ink">Menu</x-markas.underline-link>
<x-markas.underline-link href="#" variant="comes-in-goes-out" class="hover:text-ink">Outlets</x-markas.underline-link>
<x-markas.underline-link href="#" variant="comes-in-goes-out" class="hover:text-ink">Rewards</x-markas.underline-link>
<x-markas.underline-link href="#" variant="comes-in-goes-out" class="hover:text-ink">About</x-markas.underline-link>
</nav>
</header>This release adds six text effects. Read the migration guide before you upgrade, or browse the full changelog first.
This release adds six text effects. Read the migration guide before you upgrade, or browse the full changelog first.
This release adds six text effects. Read the migration guide before you upgrade, or browse the full changelog first.
This release adds six text effects. Read the migration guide before you upgrade, or browse the full changelog first.
This release adds six text effects. Read the migration guide before you upgrade, or browse the full changelog first.
<article class="text-base leading-relaxed text-muted">
<h3 class="text-lg font-semibold text-ink">Release notes</h3>
<p class="mt-2">This release adds six text effects. Read the <x-markas.underline-link href="#" variant="scribble" class="font-medium text-ink">migration guide</x-markas.underline-link> before you upgrade, or browse the <x-markas.underline-link href="#" variant="goes-out-comes-in" class="font-medium text-ink">full changelog</x-markas.underline-link> first.</p>
</article>npx markasui@latest add underline-linkpnpm dlx markasui@latest add underline-linkyarn dlx markasui@latest add underline-linkbunx --bun markasui@latest add underline-linkresources/views/components/markas/underline-link.blade.php.src/components/markas/UnderlineLink.tsx.src/components/markas/UnderlineLink.vue.src/lib/components/markas/UnderlineLink.svelte.src/components/markas/UnderlineLink.astro.src/app/markas/underline-link.component.ts.<nav class="flex gap-5 text-sm font-medium">
<x-markas.underline-link href="/" active>Home</x-markas.underline-link>
<x-markas.underline-link href="/docs" variant="comes-in-goes-out">Docs</x-markas.underline-link>
</nav>
<x-markas.underline-link href="/guide" variant="scribble">Migration guide</x-markas.underline-link>import { UnderlineLink } from "@/components/markas/UnderlineLink";
<nav className="flex gap-5 text-sm font-medium">
<UnderlineLink href="/" active>Home</UnderlineLink>
<UnderlineLink href="/docs" variant="comes-in-goes-out">Docs</UnderlineLink>
</nav>
<UnderlineLink href="/guide" variant="scribble">Migration guide</UnderlineLink><template>
<nav class="flex gap-5 text-sm font-medium">
<UnderlineLink href="/" active>Home</UnderlineLink>
<UnderlineLink href="/docs" variant="comes-in-goes-out">Docs</UnderlineLink>
</nav>
<UnderlineLink href="/guide" variant="scribble"
>Migration guide</UnderlineLink
>
</template><script lang="ts">
import UnderlineLink from "$lib/components/markas/UnderlineLink.svelte";
</script>
<nav class="flex gap-5 text-sm font-medium">
<UnderlineLink href="/" active>Home</UnderlineLink>
<UnderlineLink href="/docs" variant="comes-in-goes-out">Docs</UnderlineLink>
</nav>
<UnderlineLink href="/guide" variant="scribble">Migration guide</UnderlineLink>---
import UnderlineLink from "@/components/markas/UnderlineLink.astro";
---
<nav class="flex gap-5 text-sm font-medium">
<UnderlineLink href="/" active>Home</UnderlineLink>
<UnderlineLink href="/docs" variant="comes-in-goes-out">Docs</UnderlineLink>
</nav>
<UnderlineLink href="/guide" variant="scribble">Migration guide</UnderlineLink>import { Component } from "@angular/core";
import { UnderlineLink } from "./markas/underline-link.component";
@Component({
selector: "app-site-nav",
imports: [UnderlineLink],
template: `
<nav class="flex gap-5 text-sm font-medium">
<a markas-underline-link href="/" active>Home</a>
<a markas-underline-link href="/docs" variant="comes-in-goes-out">Docs</a>
</nav>
<a markas-underline-link href="/guide" variant="scribble"
>Migration guide</a
>
`,
})
export class SiteNav {}Angular uses an attribute selector on the native link, so target, rel, aria-*, and class stay on it. No script in Astro: the line is pure CSS.
active, which also sets aria-current="page".currentColor, so they follow the text color of the link.inline-block so the line sits under the whole label; keep labels on one line.| Name | Type | Default | Description |
|---|---|---|---|
href | string | - | Link target. Schemes other than http, https, mailto, and tel are replaced with #. |
variant | "grow-center" | "slide" | "comes-in-goes-out" | "goes-out-comes-in" | "scribble" | "grow-center" | grow-center grows from the middle, slide grows from and returns to the left, comes-in-goes-out enters from the left and leaves to the right, goes-out-comes-in is visible at rest and redraws itself, scribble draws a hand drawn stroke. |
active | boolean | false | Mark the link as the current page with aria-current="page" and keep the line visible. |
More animations components with the same classes in every framework.
MarkasUI is free and open source. A coffee keeps it going.
Coffee Rp 25.000 + QRIS service fee Rp 479 = total Rp 25.479
Buy me a coffeePreparing your experience
Switching to English
Menyiapkan tampilan
Beralih ke Bahasa Indonesia