LinkButton
Deprecated. Use
<Button href={…}>and wireRoadieLinkProviderat the app root for client-side routing instead.LinkButtonandLinkIconButtonremain exported and continue to work for back-compat, but will be removed in v3.0.0.
A link styled as a button for navigation actions. Shares all visual styles with Button.
Import
import { LinkButton, LinkIconButton } from '@oztix/roadie-components'
Examples
Default
<LinkButton href='#'>Link button</LinkButton>
Emphasis
Sizes
Intents
With custom component (legacy)
Recommended: wire
RoadieLinkProviderat the app root and use<Button href={…}>— it routes through your configured Link automatically. Theasprop below is preserved for back-compat only and will be removed in v3.0.0.
import Link from 'next/link'<LinkButton as={Link} href='/about'>About</LinkButton>
Guidelines
- Use
<Button href={…}>for new navigation links —LinkButtonis deprecated. - Use Button for actions that don't navigate (form submissions, toggles, dialogs).
- For icon-only links, use
<IconButton href={…}>.
Accessibility
- Keyboard:
Enteractivates the link. Focus is indicated by a semi-transparent ring viais-interactive. - ARIA: Renders as a native
<a>element by default. Screen readers announce it as a link, not a button.
API reference
LinkButton
A link styled as a button.
as?ElementType
intent?"neutral" | "brand" | "brand-secondary" | "accent" | "danger" | "success" | "warning" | "info"
Defaults to 'neutral'.
emphasis?"strong" | "normal" | "subtle" | "subtler"
Defaults to 'normal'.
size?"xs" | "sm" | "md" | "lg"
Defaults to 'md'.
className?string