Leptos-Use Guide

use_permission

Reactive Permissions API.

Demo

Usage

use leptos::prelude::*;
use leptos_use::use_permission;

#[component]
fn Demo() -> impl IntoView {
let microphone_access = use_permission("microphone");

view! { }
}

Server-Side Rendering

On the server the returned signal will always be PermissionState::Unknown.

Feature

This function is only available if the crate feature use_permission is enabled

Types

Source

SourceDemoDocs