### Svelte Deck Project Setup Commands
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Provides essential bash commands for setting up a new Svelte Deck presentation project, including cloning the repository, installing dependencies, starting the development server, building for production, and running various development tasks like type checking, formatting, and linting.
```bash
# Clone the repository
git clone https://github.com/joysofcode/svelte-deck
cd svelte-deck
# Install dependencies (using pnpm, npm, or yarn)
pnpm install
# or
npm install
# or
yarn install
# Start development server
pnpm dev
# Runs on http://localhost:5173
# Build for production
pnpm build
# Preview production build
pnpm preview
# Type checking
pnpm check
# Format code
pnpm format
# Lint code
pnpm lint
```
--------------------------------
### Project Setup and Commands
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Instructions for cloning the Svelte Deck repository, installing dependencies, and running development or production builds.
```APIDOC
## Project Setup and Commands
Install and configure a new Svelte Deck presentation project.
```bash
# Clone the repository
git clone https://github.com/joysofcode/svelte-deck
cd svelte-deck
# Install dependencies (using pnpm, npm, or yarn)
pnpm install
# or
npm install
# or
yarn install
# Start development server
pnpm dev
# Runs on http://localhost:5173
# Build for production
pnpm build
# Preview production build
pnpm preview
# Type checking
pnpm check
# Format code
pnpm format
# Lint code
pnpm lint
```
Project configuration in `src/routes/+page.ts`:
```typescript
// Disable SSR for client-side presentation
export const ssr = false
```
```
--------------------------------
### Markdown External File Format Example
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
An example of the expected format for external markdown files used with Svelte Deck. It shows how to define slides, include code blocks with syntax highlighting, and use horizontal rules to separate slides.
```markdown
## Slide 1
You can write the entire presentation in Markdown using an external Markdown file.
---
## Slide 2
```js [2|1-3]
function love() {
console.log('Svelte')
}
```
---
## Slide 3
- Point one
- Point two
- Point three
```
--------------------------------
### Svelte Presentation Structure
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Demonstrates how to compose a complete presentation by structuring multiple Svelte components within the main presentation file. This includes examples of title slides, content slides, vertical navigation, animated transitions, and markdown integration.
```svelte
with Svelte and SvelteKit Everything is a component Questions? ContentBuilding Modern Web Apps
Why Svelte?
Core Concepts
Reactivity
{`
let count = 0
$: doubled = count * 2
`}
Components
Thank You!
{`code here`}
```
--------------------------------
### Svelte Deck Slide Component API
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Details the props available for the Svelte Deck `Slide` component, including `id` for auto-animation, `animate` to enable animations, and `restart` to reset the animation sequence. Includes usage examples.
```typescript
// Slide Component Props
interface SlideProps {
id?: string | null // ID for auto-animation matching
animate?: boolean // Enable auto-animation
restart?: boolean // Restart animation sequence
}
// Usage
Welcome to Svelte Deck 🔥
This slide will auto-animate
Animation sequence restarts here
Content
{`code here`}
```
### Markdown Component
**Props:**
- `name` (string) - Optional: Filename for external markdown.
- `external` (boolean) - Optional: Load from external file.
**Usage - Inline:**
```svelte
` component to display syntax-highlighted code, with options for progressive line highlighting using the `lines` attribute, and preserving HTML content with `noescape`.
```svelte
{`
function greet(name) {
// This line highlights first
const message = \`Hello, ${name}!`
// These lines highlight third
console.log(message)
return message
}
`}
{`
const data = await fetch('/api/users')
const users = await data.json()
`}
{`
Preserved HTML
`}
```
--------------------------------
### Svelte External Markdown File Loading
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Illustrates how to load presentation content from external markdown files in Svelte using the `` component with the `external` attribute. This promotes better organization for larger presentations.
```svelte
```
--------------------------------
### Svelte Auto-Animating Code Blocks with IDs
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Demonstrates how to create smooth transitions between different code states in Svelte using the Code component and matching IDs. This allows for animating specific lines or ranges of code as the slide progresses.
```svelte
{`
`}
{`
`}
{`
{code`
console.log('Hello World')
`}
`}
```
--------------------------------
### Svelte Inline Markdown Rendering
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Shows how to render markdown content directly within Svelte components using the `` component. This is useful for including formatted text, lists, and code blocks within slides.
```svelte
{`
## Introduction to Svelte
Svelte is a **radical new approach** to building user interfaces.
- Truly reactive
- No virtual DOM
- Less code
### Key Features
1. Compile-time optimization
2. Built-in state management
3. Scoped CSS by default
`}
{`
### Code Example
```javascript
let count = 0
function increment() {
count += 1
}
```
**Note:** This code is reactive by default!
`}
```
--------------------------------
### SvelteKit SSR Configuration for Presentations
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Configures a SvelteKit project to disable Server-Side Rendering (SSR), ensuring the presentation runs purely on the client-side. This is typically done in the `src/routes/+page.ts` file for presentation frameworks.
```typescript
// Disable SSR for client-side presentation
export const ssr = false
```
--------------------------------
### Svelte Deck Notes Component API
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Details the `Notes` component in Svelte Deck, which acts as a simple slot wrapper for speaker notes. It has no specific props and is used for embedding explanatory text.
```typescript
// Notes Component Props
interface NotesProps {
// No props - simple slot wrapper
}
// Usage
Speaker notes here
```
--------------------------------
### Animate List Elements with Svelte Deck
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Demonstrates progressive disclosure and reordering of list items using the `animate` prop on slides with matching IDs. This creates dynamic list animations.
```svelte
- React
- Solid
- Svelte
- Vue
- Svelte
- React
- Solid
- Vue
- Svelte ❤️
- React
- Solid
- Vue
```
--------------------------------
### Create Vertical Slide Navigation in Svelte Deck
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Shows how to implement vertical navigation within a presentation by nesting `` components. This allows for hierarchical structuring of slides.
```svelte
Main topic
Subtopic 1
Subtopic 2
Subtopic 3
Next main topic
```
--------------------------------
### Auto-Animate Elements Across Slides with Svelte Deck
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Illustrates how to create smooth transitions and morphing effects for elements across slides using matching `id` attributes and the `animate` prop. Elements with `data-id` will animate between states.
```svelte
Cool transitions
Moving boxes
```
--------------------------------
### Svelte Adding Speaker Notes with Notes Component
Source: https://context7.com/joysofcode/svelte-deck/llms.txt
Demonstrates how to include speaker notes within Svelte slides using the `` component. These notes are visible in presenter mode but hidden from the audience.
```svelte
Quarterly Results
Revenue increased by 45%
Remember to mention:
- Q1 vs Q2 comparison
- Market conditions
- Future projections
Don't forget to pause for questions!
Technical Architecture
Walk through each component slowly.
Be prepared to answer questions about:
- Scalability concerns
- Security measures
- Deployment strategy
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.