Diwa Design System

Link

Links navigate users to a new page or section. Use the variant that communicates the visual weight of the navigation action.

Properties

NameTypeDefaultDescription
theme'light' | 'dark''dark'Per-component theme override.
variant'primary' | 'secondary' | 'ghost''primary'Visual style variant.
hrefstringundefinedURL the link navigates to. Renders as <a> when set, <span> otherwise.
target'_self' | '_blank' | '_parent' | '_top''_self'Where to open the linked URL.
downloadstringundefinedTriggers browser download dialog for the linked resource.
relstringundefinedRelationship of the target. Defaults to noopener noreferrer when target="_blank".
iconstring'none'Lucide icon name (kebab-case), or "none" to hide icon.
hideLabelbooleanfalseVisually hides the label (icon-only mode). Always pair with label.
compactbooleanfalseEnables dense mode with a smaller font size.
labelstringundefinedAccessible aria-label for icon-only usage.

Events

diwa-link is a navigation element and emits no custom events.

Slots

NameDescription
(default)Link label text or mixed content.

CSS shadow parts

PartDescription
baseThe inner <a> or <span> element.
labelThe label span wrapping the slotted content.