Text and Code
Readable links, keyboard hints, and code treatments. CSS only
<div class="ui-primitive-copy"> <p>Use <a class="ui-link" href="#link">links</a>, <code class="ui-code">inline code</code>, and <kbd class="ui-kbd">Cmd</kbd><kbd class="ui-kbd">K</kbd> in dense interface text.</p> <pre class="ui-code" tabindex="0" aria-label="Component CSS import"><code>import '@timelessui/components/css/components.css'</code></pre></div>Install
import '@timelessui/components/css/tokens.css'import '@timelessui/components/css/link.css'import '@timelessui/components/css/kbd.css'import '@timelessui/components/css/code.css'Attributes
Every value below is implemented by the stylesheets this component ships. Boolean attributes are presence-based: author the attribute with no value, or omit it.
ui-link
| Attribute | Values | Default | Description |
|---|---|---|---|
data-ui-variant | default · muted · danger | default | Link color intent. |
Styling
Root identity: ui-link, ui-kbd, ui-code. Required stylesheets: tokens.css, link.css, kbd.css, code.css.
This component adds no custom properties of its own. Restyle it through the design tokens or your own CSS.
Design tokens this component reads (16)
These are global Atmosphere tokens. Change them once at the theme level rather than per component.
--ui-accent · --ui-accent-hover · --ui-bg-control-muted · --ui-bg-surface · --ui-bg-surface-raised · --ui-danger · --ui-duration-fast · --ui-ease-standard · --ui-fg · --ui-fg-muted · --ui-focus · --ui-font-mono · --ui-line · --ui-radius-sm · --ui-radius-xs · --ui-space-4
Accessibility
Keep the native elements, roles, and relationships shown in the example. Timeless adds only the state and keyboard coordination the platform does not already provide, and it never supplies your accessible names — those depend on your content.
Before JavaScript runs
This primitive is CSS only. There is nothing to register and nothing to wait for.
More examples
Open Text and Code in StoryLite for variants, controls, and manual testing.