diff --git a/thaw/src/link/docs/mod.md b/thaw/src/link/docs/mod.md index 030efaf..a88bf0a 100644 --- a/thaw/src/link/docs/mod.md +++ b/thaw/src/link/docs/mod.md @@ -77,3 +77,4 @@ view! { | disabled | `MaybeSignal` | `false` | Whether the link is disabled. | | disabled_focusable | `MaybeSignal` | `false` | When set, allows the link to be focusable even when it has been disabled. | | children | `Children` | | | +| target | `MaybeSignal` | | Specifies where to open the linked document. | diff --git a/thaw/src/link/link.rs b/thaw/src/link/link.rs index 5d18515..a00349e 100644 --- a/thaw/src/link/link.rs +++ b/thaw/src/link/link.rs @@ -16,6 +16,9 @@ pub fn Link( #[prop(optional, into)] disabled_focusable: MaybeSignal, children: Children, + /// Specifies where to open the linked document. + #[prop(optional, into)] + target: MaybeSignal, ) -> impl IntoView { mount_style("link", include_str!("./link.css")); @@ -46,6 +49,7 @@ pub fn Link( href=href tabindex=tabindex aria-disabled=move || link_disabled.get().then_some("true") + target=target > {children()}