This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useFullscreen } from "@vueuse/core"; | |
const { isFullscreen, enter, exit, toggle } = useFullscreen(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { usePermission } from "@vueuse/core"; | |
const microphoneAccess = usePermission("microphone"); | |
const accelerometer = usePermission('accelerometer') | |
const accessibilityEvents = usePermission('accessibility-events') | |
const ambientLightSensor = usePermission('ambient-light-sensor') | |
const backgroundSync = usePermission('background-sync') | |
const camera = usePermission('camera') | |
const clipboardRead = usePermission('clipboard-read') | |
const clipboardWrite = usePermission('clipboard-write') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useScreenOrientation } from "@vueuse/core"; | |
const { | |
isSupported, // boolean | |
orientation, //orientation type, reactive | |
angle, // orientation angle, reactive | |
lockOrientation, // lock orientation, accepts orientation type, function | |
unlockOrientation, // unlock orientation, function | |
} = useScreenOrientation(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useDeviceOrientation } from "@vueuse/core"; | |
const { | |
isAbsolute, | |
alpha, // z-axis, range: 0-360 | |
beta, // x-axis, range: -180 to 180 | |
gamma, // y-axis, range: -90 to 90 | |
} = useDeviceOrientation(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useWakeLock } from "@vueuse/core"; | |
const { isSupported, isActive, request, release } = useWakeLock(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useBattery } from "@vueuse/core"; | |
const { charging, chargingTime, dischargingTime, level } = useBattery(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useDevicesList } from "@vueuse/core"; | |
const { | |
devices, | |
videoInputs: cameras, | |
audioInputs: microphones, | |
audioOutputs: speakers, | |
} = useDevicesList(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useBattery } from "@vueuse/core"; | |
const { charging, chargingTime, dischargingTime, level } = useBattery(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup> | |
import { useVibrate } from "@vueuse/core"; | |
// This vibrates the device for 300 ms | |
// then pauses for 100 ms before vibrating the device again for another 300 ms: | |
const { vibrate, stop, isSupported } = useVibrate({ pattern: [300, 100, 300] }); | |
// Start the vibration, it will automatically stop when the pattern is complete: | |
vibrate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
.tree{ | |
--spacing : 1.5rem; | |
--radius : 10px; | |
} | |
.tree li{ | |
display : block; | |
position : relative; | |
padding-left : calc(2 * var(--spacing) - var(--radius) - 2px); |
NewerOlder