LinkButton
The props declared for LinkButton, generated from the types @proyecto-viviana/ui ships.
Import
import { LinkButton } from "@proyecto-viviana/ui";Props
Differs from @proyecto-viviana/solid-spectrum
variantadds 'warning', 'success', 'create', 'terminal'; does not have 'premium', 'genai'.
| Prop | Type | Default | Description |
|---|---|---|---|
children | number | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | — | The content to display in the LinkButton. |
variant | 'primary' | 'secondary' | 'accent' | 'negative' | 'warning' | 'success' | 'create' | 'terminal' | — | The visual style of the LinkButton. |
fillStyle | 'fill' | 'outline' | — | The background style of the LinkButton. |
size | 'S' | 'M' | 'L' | 'XL' | — | The size of the LinkButton. |
staticColor | 'white' | 'black' | 'auto' | — | The static color style to apply. Useful when the LinkButton appears over a color background. |
styles | StyleString | — | Spectrum-defined generated classes. |
UNSAFE_className | string | — | Additional CSS class name. Use only as a last resort. |
UNSAFE_style | JSX.CSSProperties | — | Additional inline styles. Use only as a last resort. |
slot | string | false | — | A slot name for the component. HTML `slot` may be `false` to omit. solidaria-components |
ref | ((el: HTMLElement) => void) | { current?: HTMLElement | null | undefined; } | — | Ref for the underlying link element. 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 |
isDisabled | false | true | — | Whether the link is disabled. solidaria |
onHoverStart | (e: HoverEvent) => void | — | Handler called when the hover starts. solidaria |
onHoverEnd | (e: HoverEvent) => void | — | Handler called when the hover ends. solidaria |
onHoverChange | (isHovering: boolean) => void | — | Handler called when the hover state changes. 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/button/LinkButton.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.