Link
The props declared for Link, generated from the types @proyecto-viviana/ui ships.
Import
import { Link } from "@proyecto-viviana/ui";Props
| Prop | Type | Default | Description |
|---|---|---|---|
variant | 'primary' | 'secondary' | 'primary' | The visual style of the link. |
staticColor | 'white' | 'black' | 'auto' | — | The static color style to apply when the link appears over a color background. |
isStandalone | false | true | — | Whether the link is on its own vs inside a longer string of text. |
isQuiet | false | true | — | Whether the link should be displayed with a quiet style. |
styles | StyleString | — | Spectrum-defined generated classes. |
UNSAFE_className | string | UnsafeClassName | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
children | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | — | The content of the link. |
ref | HTMLElement | ((el: HTMLElement) => void) | { current?: HTMLElement | null | undefined; } | — | Ref for the underlying link element. |
slot | string | false | — | A slot name for the component. HTML `slot` may be `false` to omit. solidaria-components |
id | string | — | The unique identifier for the element. solidaria-components |
onBlur | (e: FocusEvent) => void | — | Handler that is called when the element loses focus. solidaria |
onFocus | (e: FocusEvent) => void | — | Handler that is called when the element receives focus. solidaria |
onKeyDown | (e: KeyboardEvent) => void | — | Handler that is called when a key is pressed. solidaria |
onKeyUp | (e: KeyboardEvent) => void | — | Handler that is called when a key is released. solidaria |
aria-current | false | true | 'page' | 'step' | 'location' | 'date' | 'time' | 'true' | 'false' | — | Indicates the current "page" or state within a set of related elements. solidaria |
aria-describedby | string | — | Identifies the element (or elements) that describes the object. solidaria |
aria-details | string | — | Identifies the element (or elements) that provide a detailed description. solidaria |
aria-label | string | — | Defines a string value that labels the current element. solidaria |
aria-labelledby | string | — | Identifies the element (or elements) that labels the current element. solidaria |
href | string | — | The URL to link to. solidaria |
target | string | — | The target window for the link. solidaria |
rel | string | — | The relationship between the linked resource and the current page. solidaria |
onPress | (e: PressEvent) => void | — | Handler that is called when the press is released over the target. solidaria |
onPressStart | (e: PressEvent) => void | — | Handler that is called when a press interaction starts. solidaria |
onPressEnd | (e: PressEvent) => void | — | Handler that is called when a press interaction ends. solidaria |
onPressUp | (e: PressEvent) => void | — | Handler that is called when a press is released over the target. solidaria |
onPressChange | (isPressed: boolean) => void | — | Handler that is called when the press state changes. solidaria |
autoFocus | false | true | — | Whether to autofocus the element. solidaria |
routerOptions | Record<string, unknown> | — | Additional options forwarded to client-side router navigation handlers. solidaria |
hrefLang | string | — | Hints the language of the linked resource. solidaria |
download | string | boolean | — | Instructs the browser to download the URL instead of navigating to it. solidaria |
ping | string | — | Space-separated list of URLs to ping when following the link. solidaria |
referrerPolicy | '' | 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url' | — | Referrer policy for fetches initiated by this link. solidaria |
onFocusChange | (isFocused: boolean) => void | — | Handler that is called when the element's focus status changes. solidaria |
Declared in packages/viviana-ui/src/link/index.tsx.
Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.