Skip to content

Instantly share code, notes, and snippets.

View movntains's full-sized avatar

movntains

View GitHub Profile
@movntains
movntains / ComponentMounter.ts
Created September 15, 2025 22:00
Test Utils for Vue Components
/* eslint-disable @typescript-eslint/no-explicit-any */
import merge from 'lodash.merge'
import { DefineComponent } from 'vue'
import { mount as testUtilsMount } from '@vue/test-utils'
import { TestingOptions, createTestingPinia } from '@pinia/testing'
export type AnyVueComponent = DefineComponent<any, any, any, any, any>
export type MountOptions = {
@movntains
movntains / AppDraggableContainer.vue
Created July 31, 2025 21:29
A fully accessible and reusable set of components for drag-and-drop in Vue
<template>
<div>
<div
id="reorder_instructions"
class="sr-only"
v-text="reorderInstructions"
/>
<div
aria-live="assertive"
class="sr-only"
@movntains
movntains / AppModal.vue
Last active June 8, 2023 18:14
Custom Vue focus trap directive with examples
<template>
<div
v-if="name === openedModal"
v-trap="modalIsOpen"
>
<div
role="dialog"
aria-labelledby="modalTitle"
>
<button