Link

A styled hyperlink component.

As Button

Use render_as to render a Link component with Button styling.

As Badge

Use render_as to render a Link component with Badge styling.

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::Link;

#[component]
pub fn LinkAnatomy() -> impl IntoView {
    view! { <Link /> }
}

API Reference

Link

Creates a styled hyperlink.

Custom Attributes
NameTypeDefaultDescription
render_asString""

Set whether or not this Link should appear as something else. This is similar to asChild. Accepted values are "button" | "badge".

mimetypeString""

Renamed <a> `type` attribute to avoid name collisions.

sizeString""

For use with render_as, specify the size to render the element.

variantString"link"

For use with render_as, specify the variant of the element to render.

Implements global and a attributes.