Hoppa till huvudinnehåll

LinkButton

Komponent med samma utseende och beteende som Button men avsedd att använda som länk internt eller externt i en applikation.

import { LinkButton } from '@midas-ds/components'

<LinkButton href='#'>Starta tjänst</LinkButton>

Client Side Routing​

Läs mer om hur du kan använda komponenten med Client Side Routing.

Riktlinjer​

Se mönstret Knappar och länkar

API​

NameTypeDefaultDescription
variant'primary'

Primary button is used as a positive action in a flow. Always use one primary button and never a seconday button on it's own. When using just an icon you must pass an aria-label

fullwidthfalse

Adds width: 100%; for the button to span entire width of parent

iconPlacement-

Display the icon on the left or right side of the button text

iconLucideIcon-

Replace the icon with an icon from lucide-react See Lucide

className-
as-

Replace base component with any Client Side Routing link instead. See Client side routing

sizelarge

Component size (large: height 48px, medium: height 40px)