### Install v-tmline Component (pnpm, npm, yarn)
Source: https://github.com/ir3ne/v-tmline/blob/main/docs/guide/getting-started.md
Instructions for installing the v-tmline component using different package managers: pnpm, npm, and yarn. This is the initial step before integrating the component into your Vue application.
```bash
pnpm add v-tmline
```
```bash
npm add v-tmline
```
```bash
yarn add v-tmline
```
--------------------------------
### Access VitePress Data in Markdown (.md) - Vue
Source: https://github.com/ir3ne/v-tmline/blob/main/docs/api-examples.md
Demonstrates how to use the `useData()` hook from VitePress within a Markdown file to access theme, page, and frontmatter data. This example assumes a Vue setup within the Markdown.
```vue
## Results
### Theme Data
{{ theme }}
### Page Data
{{ page }}
### Page Frontmatter
{{ frontmatter }}
```
--------------------------------
### Install v-tmline with npm
Source: https://github.com/ir3ne/v-tmline/blob/main/README.md
This command installs the v-tmline package, a Vue 3 timeline component, using npm. Ensure you have Node.js and npm installed on your system.
```bash
npm install v-tmline
```
--------------------------------
### Syntax Highlighting with Line Highlight - JavaScript
Source: https://github.com/ir3ne/v-tmline/blob/main/docs/markdown-examples.md
Demonstrates syntax highlighting for JavaScript code blocks using VitePress, with a specific line highlighted. This feature is powered by Shiki and allows for visual emphasis on code lines. No external dependencies are required beyond VitePress itself.
```javascript
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
--------------------------------
### Full Vue Timeline Example with Customization
Source: https://github.com/ir3ne/v-tmline/blob/main/README.md
A comprehensive example of the v-tmline component in a Vue 3 application, demonstrating the use of various props (mode, fill, colored, align) and a custom default slot for content.
```vue
{{ item.label }}
Custom content here
```
--------------------------------
### Custom Container Syntax - Markdown
Source: https://github.com/ir3ne/v-tmline/blob/main/docs/markdown-examples.md
Illustrates the use of custom container blocks in VitePress markdown for creating styled informational boxes. Supported types include 'info', 'tip', 'warning', 'danger', and 'details'. These containers help visually differentiate content sections without requiring complex HTML or CSS.
```markdown
::: info
This is an info box.
:::
::: tip
This is a tip.
:::
::: warning
This is a warning.
:::
::: danger
This is a dangerous warning.
:::
::: details
This is a details block.
:::
```
--------------------------------
### Vue Timeline Dark Mode Example
Source: https://github.com/ir3ne/v-tmline/blob/main/README.md
Illustrates how to enable dark mode for the v-tmline component by setting the 'mode' prop to 'dark'. This is useful for applications with a dark theme.
```vue
```
--------------------------------
### Access VitePress Data in Vue (.vue) - Vue
Source: https://github.com/ir3ne/v-tmline/blob/main/docs/api-examples.md
Illustrates the usage of the `useData()` hook in VitePress within a Vue component file to fetch and display site, theme, page, and frontmatter information. This is a standard way to access runtime data in Vue SFCs.
```vue
## Results
### Theme Data
{{ theme }}
### Page Data
{{ page }}
### Page Frontmatter
{{ frontmatter }}
```
--------------------------------
### Vue Timeline Right-Aligned Example
Source: https://github.com/ir3ne/v-tmline/blob/main/README.md
Demonstrates how to align the v-tmline component to the right by setting the 'align' prop to 'right'. This changes the layout of the timeline items.
```vue
```
--------------------------------
### Vue Timeline Custom Colored Example
Source: https://github.com/ir3ne/v-tmline/blob/main/README.md
Shows how to customize the color of the v-tmline component by passing a valid CSS color value to the 'colored' prop. This allows for branding or theming the timeline.
```vue
```
--------------------------------
### Vue 3 Usage of v-tmline Timeline Component
Source: https://github.com/ir3ne/v-tmline/blob/main/docs/guide/getting-started.md
Demonstrates how to import and use the Timeline component in a Vue 3 application. It shows setting up an array of timeline items with labels and passing them as a prop to the Timeline component.
```vue
```
--------------------------------
### Customize Default Timeline Item Rendering with Vue Slot
Source: https://github.com/ir3ne/v-tmline/blob/main/docs/reference/slots.md
Demonstrates how to use the default '#item' slot in v-tmline to customize the rendering of each timeline item. It takes an 'item' object as scope.
```vue
Default: {{ item.label }}
```
--------------------------------
### Use Dynamic Named Slots for Custom Timeline Item Content in Vue
Source: https://github.com/ir3ne/v-tmline/blob/main/docs/reference/slots.md
Shows how to implement dynamic named slots in v-tmline by defining specific slot names (e.g., '#custom-slot-1') based on item data. Each slot receives an 'item' object for rendering.
```vue
🏢 {{ item.label }}
{{ item.company }}
🎓 {{ item.label }}
{{ item.school }}
```
--------------------------------
### Vue Timeline Named Slot Customization
Source: https://github.com/ir3ne/v-tmline/blob/main/README.md
Shows how to use named slots in v-tmline to create distinct templates for different types of timeline items, such as 'work' or 'education'. This allows for highly specific content formatting.
```vue
💫 {{ item.label }}
{{ item.company }}
📚 {{ item.label }}
{{ item.school }}
```
--------------------------------
### Vue Timeline Default Slot Customization
Source: https://github.com/ir3ne/v-tmline/blob/main/README.md
Explains how to customize the content of individual timeline items using the default slot in v-tmline. The 'item' scope variable provides access to the current item's data.
```vue
Default: {{ item.label }}
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.