Package-level declarations

Types

Link copied to clipboard
interface BasePath

Represents a subpath under which the user's entire site is served under.

Link copied to clipboard
typealias ErrorPageMethod = @Composable (Int) -> Unit

Typealias for a composable method which takes an error code as its first and only argument (e.g. 404).

Link copied to clipboard
Link copied to clipboard
typealias PageMethod = @Composable (PageContext) -> Unit
Link copied to clipboard
class Route(pathQueryAndFragment: String)

A path component to a relative or absolute URL string without a domain, e.g. "/example/path" or "example/path".

Link copied to clipboard
Link copied to clipboard
class RouteInterceptorScope(pathQueryAndFragment: String)

Scope provided backing the handler for Router.addRouteInterceptor.

Link copied to clipboard
typealias RoutePrefix = BasePath
Link copied to clipboard
class Router

The class responsible for navigating to different pages in a user's app.

Link copied to clipboard

How to affect the current history when navigating to a new location

Properties

Link copied to clipboard

Functions

Link copied to clipboard
@Composable
fun Anchor(href: String, attrs: AttrBuilderContext<HTMLAnchorElement>? = null, openInternalLinksStrategy: OpenLinkStrategy? = null, openExternalLinksStrategy: OpenLinkStrategy? = null, updateHistoryMode: UpdateHistoryMode? = null, content: ContentBuilder<HTMLAnchorElement>? = null)

A special version of the A tag which, when clicked on, will not reload the current page if it's within the same site.

Link copied to clipboard
fun Window.open(href: String, strategy: OpenLinkStrategy)
Link copied to clipboard

Conditionally prepend the base path only if the passed in condition is true.

Link copied to clipboard

Remove the base path from some target absolute path (relative paths will be returned as is).

Link copied to clipboard
fun SyntheticMouseEvent.toOpenLinkStrategy(default: OpenLinkStrategy = OpenLinkStrategy.IN_PLACE): OpenLinkStrategy

Convert a mouse event plus control key state to an OpenLinkStrategy.