package bonsai

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Bonsai_web_ui_nav_linkSource

Sourceval make' : ?attrs:Bonsai_web.Vdom.Attr.t list -> set_url:('a -> unit Bonsai_web.Effect.t) -> page_to_string:('a -> string) -> 'a -> Bonsai_web.Vdom.Node.t list -> Bonsai_web.Vdom.Node.t

make' is like make, but supports wrapping arbitrary nodes inside the link.

Sourceval make : ?attrs:Bonsai_web.Vdom.Attr.t list -> set_url:('a -> unit Bonsai_web.Effect.t) -> page_to_string:('a -> string) -> 'a -> string -> Bonsai_web.Vdom.Node.t

make builds a nav link, a link to navigates to another page within the app. It performs an on-page navigation when clicked directly, but also plays well with Mod-click, such as Ctrl-click to open in a new tab.

When using this inside your app, you may want to create a wrapper that fixes the page_to_string argument.