### Install vue3-flashcards
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/guide/getting-started.md
Install the vue3-flashcards package using npm.
```bash
npm install vue3-flashcards
```
--------------------------------
### Start Development Server
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
Run the development server to start working on the project.
```bash
yarn dev
# or
npm run dev
```
--------------------------------
### Install with pnpm
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/guide/installation.md
Install the vue3-flashcards package using pnpm.
```bash
pnpm add vue3-flashcards
```
--------------------------------
### Handling All Flashcards Events
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
This example shows how to listen for and handle all available events emitted by the Flashcards component. It includes setup for swipe, skip, restore, loop, and drag events.
```vue
```
--------------------------------
### Install with Yarn
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/guide/installation.md
Install the vue3-flashcards package using Yarn.
```bash
yarn add vue3-flashcards
```
--------------------------------
### Start Documentation Server
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
Launch the documentation server to preview documentation changes.
```bash
yarn docs:dev
# or
npm run docs:dev
```
--------------------------------
### Install Dependencies
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
Install project dependencies using either Yarn or npm.
```bash
yarn install
# or
npm install
```
--------------------------------
### Install Vue 3 Flashcards
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/README.md
Install the vue3-flashcards package using npm, yarn, or pnpm.
```bash
npm install vue3-flashcards
# or: yarn add vue3-flashcards ยท pnpm add vue3-flashcards
```
--------------------------------
### FlipCard Component - Index File
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/flip-cards.md
The main entry point for the FlipCard component example. It imports and renders the card components, managing their state and interactions.
```vue
```
--------------------------------
### Conventional Commits Examples
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
Examples of commit messages following the Conventional Commits specification.
```markdown
feat: add new feature
fix: bug fix
docs: documentation changes
style: formatting changes
refactor: code refactoring
test: adding tests
chore: maintenance tasks
Examples:
- feat: add dragThreshold prop to prevent false swipes
- fix: resolve animation timing issue on mobile
- docs: update FlipCard API reference
```
--------------------------------
### Scale Usage Component Implementation
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/scale-transform.md
The `index.vue` file for the scale usage example. This component likely sets up the environment for demonstrating the scale transform.
```vue
{{ card.text }}
```
--------------------------------
### Tinder Card Usage Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/tinder-style.md
This example demonstrates how to use the Tinder-style card component. It imports and renders the main `TinderUsage` component, which likely encapsulates the card logic and UI.
```vue
```
--------------------------------
### Custom Actions Example: index.vue
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/custom-actions.md
This is the main component that imports and renders the custom actions example. It sets up the flashcard component and uses the 'actions' slot to integrate custom buttons.
```vue
```
--------------------------------
### Simplest Deck Setup
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/essentials/index.md
This snippet demonstrates the most basic way to set up a deck of flashcards. It requires passing an array of items to the FlashCards component and rendering each item within the default slot. Ensure you have the FlashCards component imported and the items array defined.
```vue
{{ item.title }}
```
--------------------------------
### Basic FlipCard Usage
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flipcard.md
A simple example demonstrating the basic structure of a FlipCard component with front and back content.
```vue
Front Side
Click to flip
Back Side
Click to flip back
```
--------------------------------
### v1 CSS Keyframes Animation Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/guide/migrating-to-v2.md
This example shows how animations were handled in v1 using CSS keyframes and targeting internal classes. This approach is no longer supported in v2.
```vue
```
--------------------------------
### Peek Animation Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Use the peek method to hint a swipe by nudging the card and then settling it back. The percent is clamped to 0-1.
```javascript
flashcardsRef.value.peek(0.15, 'right') // nudge ~15% to the right
setTimeout(() => flashcardsRef.value.peek(0, 'right'), 250) // settle back
```
--------------------------------
### Basic Flashcards Component Usage
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/README.md
A minimal example demonstrating how to use the FlashCards component with basic swipe event handling and custom card styling.
```vue
{{ item.title }}
```
--------------------------------
### dragstart Event
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Emitted when user starts dragging a card. Fires immediately when dragging begins, before any movement threshold is reached. The payload includes the item being dragged.
```APIDOC
## dragstart
### Description
Emitted when user starts dragging a card. Fires immediately when dragging begins, before any movement threshold is reached.
### Payload
- **item** (T) - The card item being dragged.
```
--------------------------------
### v2 Web Animations API with `animation` Prop
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/guide/migrating-to-v2.md
This example demonstrates the v2 approach using the `animation` prop with a `keyframes` function. The library handles the fly-out, reverse for restore, and animation playback.
```vue
```
--------------------------------
### Vue Transition Effects Source - index.vue
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/transitions.md
This is the main entry point for the transition effects example, likely containing the core logic for managing and applying animations.
```vue
import { defineComponent } from 'vue'
import TransitionCard from './TransitionCard.vue'
export default defineComponent({
components: {
TransitionCard,
},
})
```
--------------------------------
### Custom Actions Example: LearningCard.vue
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/custom-actions.md
This component displays the content of a single flashcard. It receives card data and its index as props.
```vue
Card {{ index + 1 }}
{{ card.question }}
{{ card.answer }}
```
--------------------------------
### FlipCard with Front and Back Content
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flipcard.md
This example shows a complete FlipCard implementation using both `front` and `back` slots. The front content has a click handler to flip the card, and the back content provides an answer with a button to flip back.
```vue
Question
Answer: Paris
```
--------------------------------
### Minimal Vue 3 Flashcards Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/guide/getting-started.md
A basic Vue 3 component demonstrating the use of the FlashCards component with swipe event handling and a default slot for card content.
```vue
{{ item.text }}
```
--------------------------------
### Custom Transform Function Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/advanced/custom-transforms.md
Provide a custom transform function to the `transform-style` prop to control card movement and scaling.
```vue
```
--------------------------------
### Common Animation Keyframe Patterns
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/advanced/transition-effects.md
Examples of common off-screen end frames for `animation.keyframes`, including fast spin, scale to zero, 3D flip, and elastic bounce effects.
```typescript
// Fast spin
return { transform: `translateX(${x}px) rotate(720deg)`, opacity: 0 }
```
```typescript
// Scale to zero
return { transform: `translateX(${x}px) scale(0)`, opacity: 0 }
```
```typescript
// 3D flip
return { transform: `translateX(${x}px) rotateY(180deg) rotateX(45deg)`, opacity: 0 }
```
```typescript
// Elastic bounce (pair with an overshoot easing)
return { transform: `translateX(${x}px) scale(1.3) rotate(15deg)`, opacity: 0 }
// :animation="{ keyframes, easing: 'cubic-bezier(0.68, -0.55, 0.265, 1.55)' }"
```
--------------------------------
### Vue Component for Virtual Rendering Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/virtual-rendering.md
This is the main component that utilizes virtual rendering. It imports and uses the `VirtualCard` component to display items from a large dataset.
```vue
```
--------------------------------
### Handle Loop Event in FlashCards
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/advanced/loop-mode.md
Listen for the `@loop` event to be notified when the deck has completed a full cycle and is starting over. This is useful for tracking mastery or triggering actions.
```vue
```
--------------------------------
### FlashCards Actions Slot Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/essentials/actions.md
Access swipe methods like swipeLeft, swipeRight, and restore directly from the actions slot to bind them to custom buttons.
```vue
```
--------------------------------
### Flashcard Component Implementation
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/basic-usage.md
The core implementation of the flashcard component. It utilizes props like 'items' to define the card data and provides slots for custom content. This example demonstrates how to structure the component for basic functionality.
```vue
{{ item.title }}
{{ item.content }}
```
--------------------------------
### Infinite Loop Usage Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/infinite-loop.md
This snippet demonstrates how to use the InfiniteUsage component to enable infinite card swiping. It's ideal for small content sets or practice modes.
```vue
```
--------------------------------
### Configure 4-Directional Swipe
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/example/tinder-usage/README.md
Configure the FlashCards component to enable left, right, and top swipe directions. This setup allows for distinct actions for each swipe direction.
```vue
handleSwipe(item, 'left')"
@swipe-right="(item) => handleSwipe(item, 'right')"
@swipe-top="(item) => handleSwipe(item, 'top')"
>
```
--------------------------------
### Custom Actions Example: ActionButtons.vue
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/custom-actions.md
This component provides the UI for custom action buttons like skip, restore, swipe left, and swipe right. It emits events when buttons are clicked.
```vue
```
--------------------------------
### Run Build
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
Execute the build process to generate production-ready files.
```bash
yarn build
```
--------------------------------
### loop Event
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Emitted when a new loop cycle starts in loop mode. This event fires when all cards have been swiped and the component starts over from the beginning. Only triggered when `loop` prop is enabled.
```APIDOC
## loop
### Description
Emitted when a new loop cycle starts in loop mode. This event fires when all cards have been swiped and the component starts over from the beginning. Only triggered when `loop` prop is enabled.
### Payload
None
```
--------------------------------
### Vue Component for LimitCard Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/drag-limits.md
This Vue component, LimitCard.vue, is likely a child component used within the drag limit examples, possibly representing a draggable card that is subject to the defined limits.
```vue
<<< ../../example/limit-usage/LimitCard.vue [LimitCard.vue]
```
--------------------------------
### Run Linting
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
Execute the linter to check code style and identify potential issues.
```bash
yarn lint
```
--------------------------------
### Disabled FlipCard Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flipcard.md
Use the `disabled` prop to prevent user interaction with the FlipCard. Set `disabled` to `true` to disable flipping.
```vue
๐ Locked
Complete previous level to unlock
```
--------------------------------
### Project Structure Overview
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
An overview of the main directories and their purposes within the Vue3 Flashcards project.
```tree
vue3-flashcards/
โโโ src/ # Source code
โ โโโ FlashCard.vue # Main FlashCards component
โ โโโ index.ts # Entry point
โโโ example/ # Interactive examples
โโโ docs/ # VitePress documentation
โโโ dist/ # Built files
โโโ types/ # TypeScript definitions
```
--------------------------------
### Clone Repository
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
Clone the Vue3 Flashcards repository to your local machine after forking it on GitHub.
```bash
git clone https://github.com/YOUR_USERNAME/vue3-flashcards.git
cd vue3-flashcards
```
--------------------------------
### Programmatic Card Swiping and Actions
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Demonstrates how to use template refs to call methods like swipeLeft, swipeRight, swipeTop, skip, peek, and reset on the FlashCards component.
```vue
```
--------------------------------
### Comparing Virtual Rendering Performance
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/advanced/virtual-rendering.md
Demonstrates the difference in DOM nodes between rendering a large dataset without virtual rendering and with a specified `render-limit`. Use virtual rendering for significant performance gains with large datasets.
```vue
```
--------------------------------
### Use via CDN
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/guide/installation.md
Import the FlashCards component directly from a CDN link in your HTML file using a script tag with type module.
```html
```
--------------------------------
### FlipCard Component Usage
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/flip-cards.md
Demonstrates the basic usage of the FlipCard component, including importing and rendering it within a Vue application. This is suitable for beginners learning to integrate flip card functionality.
```vue
```
--------------------------------
### Scale Transform Usage Example
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/scale-transform.md
This snippet shows how to use the custom scale transform in a Vue component. It imports and renders a `ScaleUsage` component, which likely utilizes the scale transform internally.
```vue
```
--------------------------------
### FlashCards with Simple Array Items in Loop Mode
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/advanced/loop-mode.md
Demonstrates loop mode with a simple array of strings as items. The cards will cycle endlessly through 'A', 'B', and 'C'.
```vue
```
--------------------------------
### Update FlashCards Plugin Configuration from v0.x to v1.0+
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/guide/migrating-to-v2.md
When using the Vue plugin, update the configuration object to reflect prop renames. For example, change `threshold` to `swipeThreshold`, `infinite` to `loop`, and `virtualBuffer` to `renderLimit`.
```typescript
// โ v0.x
app.use(FlashCardsPlugin, {
flashCards: { threshold: 150, infinite: true, virtualBuffer: 5 }
})
// โ v1.0+
app.use(FlashCardsPlugin, {
flashCards: { swipeThreshold: 150, loop: true, renderLimit: 5 }
})
```
--------------------------------
### Import TypeScript Definitions
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/index.md
Import the necessary TypeScript types for FlashCards and FlipCard components. Ensure these types are correctly referenced in your project.
```typescript
import type { FlashCardsProps, FlipCardProps } from 'vue3-flashcards'
```
--------------------------------
### FlipCard Component Basic Usage
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/essentials/flip-cards.md
Demonstrates how to use the independent FlipCard component. Import FlipCard and use a ref to control its flip method. This is useful for creating interactive cards with front and back content.
```vue
Front content
Back content
```
--------------------------------
### Create Feature Branch
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
Create a new Git branch for implementing a new feature.
```bash
git checkout -b feat/your-feature-name
```
--------------------------------
### Define Card Interface and Data
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Define the structure for your flashcards using TypeScript interfaces and initialize a reactive array of cards.
```typescript
interface Card {
id: number
title: string
description: string
image?: string
}
interface ResetOptions {
animated?: boolean // Show restore animations (default: false)
delay?: number // Delay between animations in ms (default: 200)
}
const cards = ref([
{ id: 1, title: 'Card 1', description: 'First card' }
])
```
--------------------------------
### swipeTop()
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Triggers an upward swipe animation on the current card.
```APIDOC
## swipeTop()
### Description
Triggers upward swipe animation on the current card.
### Method
`() => void`
```
--------------------------------
### Replace Template-Ref Methods from v1 to v2
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/guide/migrating-to-v2.md
Migrate from using `approve()` and `reject()` as template-ref methods in v1 to the new directional methods `swipeRight()` and `swipeLeft()` in v2. These new methods are consistent across all swipe modes.
```typescript
// โ v1
flashcardsRef.value.approve()
flashcardsRef.value.reject()
// โ v2
flashcardsRef.value.swipeRight()
flashcardsRef.value.swipeLeft()
```
--------------------------------
### Enable Flashcards Resistance with Defaults
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Enables the rubber-band resistance effect with default threshold and strength values.
```vue
```
--------------------------------
### Enable Confirm Before Swiping
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/essentials/accessibility.md
Implement a two-step confirmation flow for swipes using `confirmOnKey`. The first key press nudges the card, and a second confirms the action. Escape cancels.
```vue
```
--------------------------------
### Hint (Peek) Card Programmatically
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/essentials/actions.md
Use the 'peek' ref-only method to nudge a card towards a direction without completing the swipe. This is useful for previews or confirmation flows.
```vue
```
--------------------------------
### skip()
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Triggers a skip animation for the current card, moving to the next card without a directional swipe.
```APIDOC
## skip()
### Description
Triggers skip animation on the current card - moves to next card without swiping in any direction.
### Method
`() => void`
```
--------------------------------
### Card Styling with CSS
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/essentials/card-content.md
Apply CSS to style the appearance of individual cards. Cards are positioned absolutely and sized by their container.
```css
.card {
width: 300px;
height: 400px;
background: white;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
```
--------------------------------
### peek(percent, direction)
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Moves the active card towards a specified direction by a given percentage without completing the swipe. This is useful for providing visual hints or implementing confirmation flows.
```APIDOC
## peek(percent, direction)
### Description
Moves the active card toward `direction` to `percent` (a `0`โ`1` fraction of [`swipeThreshold`](#swipethreshold)) **without** completing the swipe โ the same rotation/scale ([`transformStyle`](#transformstyle)) and directional indicators react exactly as they do mid-drag. Useful for hints (nudge the card to invite a swipe) and for building a "confirm before swiping" flow.
- `percent` is clamped to `0`โ`1`. `peek(0, direction)` settles the card back to center.
- `direction` is required. A direction that is not enabled is ignored, so `peek` can never reveal a pose the user could not reach by dragging.
### Method
`(percent: number, direction: 'top' | 'left' | 'right' | 'bottom') => void`
### Parameters
#### Path Parameters
- **percent** (number) - Required - The percentage to move the card (0 to 1).
- **direction** (string) - Required - The direction to peek ('top', 'left', 'right', or 'bottom').
### Request Example
```javascript
flashcardsRef.value.peek(0.15, 'right') // nudge ~15% to the right
setTimeout(() => flashcardsRef.value.peek(0, 'right'), 250) // settle back
```
```
--------------------------------
### Push Branch to Fork
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
Push your local feature or fix branch to your GitHub fork.
```bash
git push origin your-branch-name
```
--------------------------------
### Set Stack Size
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/advanced/stack-configuration.md
Configure the number of cards displayed behind the active card. The default is 0, meaning no stacking.
```vue
```
--------------------------------
### Configure Flashcards Resistance Threshold
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Sets a custom threshold for when resistance begins and defines the swipe threshold.
```vue
```
--------------------------------
### Tracking Drag State
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/essentials/events.md
Monitor drag interactions in real-time. `dragstart` and `dragend` provide the item, while `dragmove` includes the item, direction, and drag delta.
```vue
```
--------------------------------
### Basic Usage Component
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/examples/basic-usage.md
This is the main component for basic flashcard usage. It expects an array of items for the cards and allows custom content rendering via the default slot. Swipe events can be handled for user interactions.
```vue
```
--------------------------------
### restore()
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Returns to the previous card if available. This method allows users to undo the last swipe action.
```APIDOC
## restore()
### Description
Returns to the previous card if available.
### Method
`() => void`
```
--------------------------------
### Configure Nuxt Module
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/guide/installation.md
Integrate vue3-flashcards into your Nuxt application by adding it to the nuxt.config.ts file and setting module-specific options. Components are auto-imported.
```typescript
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['vue3-flashcards/nuxt'],
flashcards: {
stack: 3,
swipeThreshold: 150,
}
})
```
--------------------------------
### reset(options?)
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Resets all cards to their initial state, clearing swipe history and removing animating cards. Options can be provided to enable animations and set delays.
```APIDOC
## reset(options?)
### Description
Resets all cards to their initial state. Clears the swipe history and removes all animating cards, effectively returning the component to its starting state.
### Method
`(options?: ResetOptions) => void`
### Parameters
#### Path Parameters
- **options** (object) - Optional - Configuration options for resetting.
- **animated** (boolean) - Optional - If true, restores cards one by one with animations (default: false).
- **delay** (number) - Optional - Delay between animations in ms when animated=true (default: 200).
### Request Example
```javascript
// Instant reset (default)
flashcardsRef.value.reset()
// Animated reset with default delay (200ms)
flashcardsRef.value.reset({ animated: true })
// Animated reset with custom delay
flashcardsRef.value.reset({ animated: true, delay: 500 })
```
```
--------------------------------
### FlipCard with Front Content and Reveal Button
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flipcard.md
This snippet demonstrates how to use the `front` slot of the FlipCard component. It includes a button that triggers the `flip` method to reveal the back content.
```vue
Question
What is the capital of France?
```
--------------------------------
### FlashCards with All Four Swipe Directions
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Configure FlashCards to support swiping in all four directions: left, right, top, and bottom. This provides the most flexible interaction model.
```vue
```
--------------------------------
### Handling Special Events
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/essentials/events.md
Utilize special events like `restore`, `skip`, and `loop` for specific card states and component behaviors.
```vue
```
--------------------------------
### renderLimit
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Specifies the number of cards to render in the DOM, used for virtual rendering with large datasets.
```APIDOC
## `renderLimit`
### Description
Number of cards to render in dom. Used for virtual rendering with large datasets. Can't be lower than 1.
### Type
`number`
### Default
`3`
### Example
```vue
```
```
--------------------------------
### flip() Method
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flipcard.md
Programmatically flips the card. This method respects the `disabled` and `waitAnimationEnd` props.
```APIDOC
## Method: flip()
### Description
Programmatically flips the card. This method respects the `disabled` and `waitAnimationEnd` props.
### Usage
Call this method on the FlipCard instance to trigger a flip.
```javascript
flipCardRef.value.flip()
```
```
--------------------------------
### Pull Request Template
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/CONTRIBUTING.md
A template for creating pull request descriptions, including change type, testing status, and related issues.
```markdown
## Description
Brief description of changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Documentation update
- [ ] Breaking change
## Testing
- [ ] Tested locally
- [ ] Build passes
- [ ] Examples work correctly
## Related Issues
Fixes #(issue number)
```
--------------------------------
### loop
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Enables loop swiping mode, allowing cards to loop endlessly after reaching the end of the dataset.
```APIDOC
## `loop`
### Description
Enables loop swiping mode. When enabled, cards will loop endlessly after reaching the end. Useful for small datasets where you want continuous swiping.
### Type
`boolean`
### Default
`false`
### Example
```vue
```
```
--------------------------------
### stack
Source: https://github.com/vad1ym/vue3-flashcards/blob/main/docs/api/flashcards.md
Determines the number of cards to show stacked behind the active card, creating a visual depth effect.
```APIDOC
## `stack`
### Description
Number of cards to show stacked behind the active card. Creates a visual depth effect where multiple cards are visible with scaling and positioning offsets.
### Type
`number`
### Default
`0`
### Warning
When stack is greater than renderLimit, renderLimit is automatically increased to stack + 2 to ensure proper rendering.
### Example
```vue
```
```