

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
12345678910# Comprehensive Slidev Guide: Crafting High-Quality Advanced Presentations1112This guide provides a dense overview of Slidev's capabilities, focusing on advanced techniques and best practices for creating visually stunning and highly interactive presentations. It assumes a basic understanding of Markdown and Vue.js.1314## 1. Core Structure and Advanced Syntax1516Slidev presentations are built upon Markdown files, enhanced with YAML frontmatter for configuration and Vue components for dynamic content.1718### Slide Separation and Frontmatter1920Separate slides with `---`. The first `---` block is the headmatter (global config), subsequent blocks are slide-specific frontmatter.2122```yaml23---24theme: seriph # Global theme25title: Advanced Slidev Techniques26canvasWidth: 1200 # Custom canvas width27aspectRatio: 16/9 # Widescreen aspect ratio28fonts:29 sans: Roboto30 mono: 'Fira Code, monospace'31 provider: google # Use Google Fonts32---33# Welcome Slide3435<!-- This is a presenter note -->3637---38layout: cover # Use the cover layout39background: /images/background.png # Slide background image40class: text-white # Apply UnoCSS classes41---42# Section Title4344::right::45Content for the right slot4647---48src: ./sections/advanced-animations.md # Import slides from another file49---50```5152**Advanced Frontmatter Options:**53- `clicks`: Manually set the total number of clicks for a slide.54- `routeAlias`: Define a custom route name for a slide for easier navigation (`<Link to="my-alias">`).55- `hideInToc`: Exclude a slide from the Table of Contents.56- `download`: Include a download button for the PDF export in the built SPA. Can be boolean (`true`) or a custom URL string.57- `monacoTypesAdditionalPackages`: Array of strings to specify extra packages for Monaco Editor type acquisition.58- `monacoTypesSource: ata`: Enable client-side auto type acquisition for Monaco.59- `drawings.persist`: Boolean (`true`/`false`) or `'dev'` to control drawing persistence.60- `transition`: Define per-slide transitions (`fade`, `slide-left`, `view-transition`, custom CSS transitions). Use `|` for forward/backward transitions (`slide-left | slide-right`). Can also be an object for advanced Vue Transition options.61- `title`: Set the title for a slide, overriding the title extracted from the first heading.62- `level`: Set the title level for a slide, affecting its appearance in the Table of Contents.63- `class`: Add custom CSS classes to the slide container.64- `style`: Add inline CSS styles to the slide container.65- `id`: Set a custom ID for the slide container.66- `name`: Set a custom name for the slide, usable with `<Link to="name">`.67- `plantUmlServer`: Configure a custom PlantUML server URL.68- `htmlAttrs`: Add attributes to the `<html>` tag for a specific slide.69- `bodyAttrs`: Add attributes to the `<body>` tag for a specific slide.70- `head`: Add custom tags to the `<head>` section for a specific slide (array of objects).71- `vue`: Configure Vue plugin options for a specific slide.72- `markdown`: Configure Markdown-it options for a specific slide.73- `highlighter`: Configure Shiki highlighter options for a specific slide.74- `katex`: Configure KaTeX options for a specific slide.75- `monaco`: Configure Monaco Editor options for a specific slide.76- `shortcuts`: Configure keyboard shortcuts for a specific slide.77- `transformers`: Configure markdown transformers for a specific slide.78- `codeRunners`: Configure code runners for a specific slide.79- `clicks`: Manually set the total number of clicks for a slide.80- `routeAlias`: Define a custom route name for a slide for easier navigation (`<Link to="my-alias">`).81- `hideInToc`: Exclude a slide from the Table of Contents.82- `download`: Include a download button for the PDF export in the built SPA. Can be boolean or a custom URL.83- `monacoTypesAdditionalPackages`: Specify extra packages for Monaco Editor type acquisition.84- `monacoTypesSource: ata`: Enable client-side auto type acquisition for Monaco.85- `drawings.persist: true`: Save drawings as SVGs. Can also be set to `false` or `dev` to disable.86- `plantUmlServer`: Configure a custom PlantUML server URL.87- `htmlAttrs`: Add attributes to the `<html>` tag for a specific slide.88- `bodyAttrs`: Add attributes to the `<body>` tag for a specific slide.89- `head`: Add custom tags to the `<head>` section for a specific slide.9091### Notes and Click Markers9293Add presenter notes using HTML comments `<!-- ... -->` at the end of a slide. Use `[click]` markers within notes to synchronize notes with click animations. `[click:N]` skips N-1 clicks.9495```markdown96<!--97Introduction to the topic9899[click] First key point100101[click:3] Third key point, skipping the second click102103[click:+2] Another point, 2 clicks after the previous marker104-->105```106107**Advanced Click Markers:**108- Use `[click]` at the beginning of a line in notes to synchronize with the next click animation on the slide.109- Use `[click:N]` to synchronize with a specific absolute click number N.110- Use `[click:+N]` to synchronize N clicks after the previous click marker.111- Content between click markers is highlighted in the presenter notes.112- Click markers help in navigating notes during the presentation, especially with the presenter mode.113114### Importing Slides115116Organize large presentations by splitting content into multiple Markdown files and importing them using the `src` frontmatter option.117118```yaml119---120src: ./chapters/chapter1.md # Import entire file121---122123---124src: ./appendix.md#2-5,8 # Import specific slides (2, 3, 4, 5, and 8)125---126```127128Frontmatter from the main entry has higher priority during merging. This allows overriding configurations from imported files.129130## 2. Mastering Visuals and Styling131132Create visually appealing slides using themes, custom styles, fonts, and assets.133134### Themes and Customization135136Apply a theme via the `theme` headmatter option. Explore the [Theme Gallery](https://sli.dev/resources/theme-gallery). Eject a theme (`slidev theme eject`) for deep customization.137138**Writing Themes:** Themes are npm packages (`slidev-theme-*`) that can provide styles, layouts, components, and default configurations (`package.json` `slidev.defaults`). Themes should focus on appearance.139140### Styling with UnoCSS141142Slidev integrates UnoCSS for utility-first styling. Apply classes directly in Markdown or components.143144```html145<div class="text-center text-primary font-bold">Centered Bold Primary Text</div>146```147148**Customizing UnoCSS:** Create `uno.config.ts` in your project root to extend configurations, add shortcuts, custom rules, variants, etc.149150```ts151import { defineConfig } from 'unocss'152export default defineConfig({153 shortcuts: {154 'btn': 'px-4 py-2 rounded inline-block bg-teal-600 text-white cursor-pointer hover:bg-teal-700 disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50',155 },156 rules: [157 [/^my-rule-(\d+)$/, ([, d]) => ({158 margin: `${d / 4}rem`,159 })],160 ],161 variants: [162 (matcher) => {163 if (!matcher.startsWith('hover:'))164 return matcher165 return {166 matcher: matcher.slice(6),167 selector: (s) => `${s}:hover`,168 }169 },170 ],171})172```173174**Scoped Styles:** Use `<style scoped>` in Markdown for slide-specific CSS. This is useful for isolated styling that doesn't affect other slides.175176### Fonts and Typography177178Configure fonts via the `fonts` headmatter option. Slidev automatically imports from Google Fonts by default.179180```yaml181---182fonts:183 sans: 'Open Sans'184 serif: 'Georgia'185 mono: 'JetBrains Mono'186 weights: '300,400,700' # Specify weights187 italic: true # Include italics188 local: 'My Local Font' # Mark as local189 fallbacks: false # Disable default fallbacks190 provider: coollabs # Use a different provider191---192```193194For fine-grained control or local fonts, use `@font-face` in custom styles (`styles/index.css`). You can also inject font links directly into `index.html`.195196### Assets and Backgrounds197198Place static assets in the `public/` directory and reference with absolute paths (`/image.png`). Use the `background` frontmatter option for slide backgrounds.199200```yaml201---202background: /images/slide-bg.jpg203---204```205206For dynamic backgrounds or more complex asset handling, use Vue components and bind the `src` attribute to data or computed properties. Use the `vite-plugin-remote-assets` for bundling remote assets.207208## 3. Creating Engaging and Interactive Content209210Leverage Slidev's features for animations, interactivity, and rich content types.211212### Advanced Animations213214**Click Animations:** Control element visibility step-by-step.215- `<v-click>` / `v-click`: Reveal on next click.216- `v-after`: Reveal with the previous `v-click`.217- `.hide`: Hide instead of show (`v-click.hide`).218- `<v-clicks>`: Apply `v-click` to children (great for lists).219- `at`: Control click timing (`v-click="3"` for absolute click 3, `v-click="'+2'"` for 2 clicks after the previous relative element).220- Enter/Leave ranges: `v-click="[2, 5]"` (visible from click 2 up to, but not including, 5).221- Custom transitions for clicked elements using CSS classes `.slidev-vclick-target` and `.slidev-vclick-hidden`. Override default opacity transition with CSS.222223**Motion:** Use `v-motion` directive for element transitions powered by `@vueuse/motion`. Trigger with clicks using `:click-N` variants. Combine with `v-click` for complex animation sequences.224225```html226<div v-motion :initial="{ x: -100 }" :enter="{ x: 0 }" :click-1="{ y: 50 }" :click-2-4="{ opacity: 0.5 }">Animated Element</div>227```228229**Slide Transitions:** Apply transitions between slides using the `transition` frontmatter option. Customize with CSS transitions using Vue's transition classes (`.my-transition-enter-active`, etc.). Use navigation direction variants (`.slidev-nav-go-forward`, `forward:`, `backward:`) for direction-specific effects. Explore the experimental View Transitions API (`transition: view-transition`).230231### Interactive Code Blocks232233Slidev's code block features are powerful for technical talks.234- **Line Highlighting:** `{2,4-6}` highlights lines 2 and 4 through 6. Use `|` for dynamic highlighting with clicks (`{1|3|all}`).235- **Monaco Editor:** `{monaco}` turns a code block into a live editor. Configure editor options globally in `./setup/monaco.ts` or per-block with `{editorOptions: {...}}`. `{monaco-diff}` creates a diff view (`~~~` separates original/modified).236- **Monaco Runner:** `{monaco-run}` adds a run button to execute code (JS/TS by default). Configure custom runners for other languages in `./setup/code-runners.ts`. Use `{autorun:false}` to disable automatic execution. Use `{showOutputAt:'+1'}` to control output visibility with clicks.237- **Writable Monaco Editor:** `<<< @/path/to/file {monaco-write}` links the editor to a file for live editing and saving (use with caution and backups!).238- **TwoSlash:** ````ts twoslash```` renders TypeScript code with type info on hover or inlined. Useful for explaining types and code behavior.239- **Import Snippets:** `<<< @/path/to/snippet.js#region-name {lines:true}` imports code from files. Use `@` for project root. Combine with line highlighting and Monaco features.240241### Rich Content Types242243- **LaTeX:** `$inline$` and `$$block$$` for mathematical formulas (powered by KaTeX). Configure KaTeX options in `./setup/katex.ts`. Enable chemical equations by importing `katex/contrib/mhchem` in `vite.config.ts`.244- **Diagrams:** ```mermaid``` and ```plantuml``` code blocks for generating diagrams from text. Configure PlantUML server URL in headmatter.245- **Icons:** Use `<collection-name>-<icon-name>` syntax after installing `@iconify-json/*` packages. Style with CSS classes. Explore [Icônes](https://icones.js.org/) for available collections.246- **MDC Syntax:** Enable with `mdc: true` in frontmatter for enhanced Markdown with components and styles (`:inline-component{prop="value"}`, `::block-component{prop="value"}::`). Useful for applying styles or using components inline within markdown text.247- **Built-in Components:** Utilize components like `<Toc>` for table of contents, `<Tweet>` for embedding tweets, `<Youtube>` and `<SlidevVideo>` for videos, `<LightOrDark>` for theme-specific content, `<RenderWhen>` for context-specific rendering, `<Link>` for internal navigation, `<Transform>` for scaling elements, etc. Explore the [Built-in Components](https://sli.dev/builtin/components) documentation for full details and props.248249## 4. Advanced Customization and Extensibility250251Go beyond basic configuration by customizing the Slidev application and adding custom features.252253### Directory Structure for Customization254255Organize custom code in specific directories:256- `components/`: Custom Vue components (auto-imported).257- `layouts/`: Custom Vue layouts.258- `public/`: Static assets (served at `/`).259- `styles/`: Global CSS/JS styles (`index.css` or `styles/index.ts`).260- `setup/`: Custom setup files for advanced configurations:261 - `main.ts`: Extend Vue application.262 - `vite-plugins.ts`: Add custom Vite plugins based on slide data.263 - `shiki.ts`: Configure Shiki highlighter.264 - `routes.ts`: Add custom pages/routes.265 - `katex.ts`: Configure KaTeX.266 - `monaco.ts`: Configure Monaco Editor.267 - `shortcuts.ts`: Configure keyboard shortcuts.268 - `transformers.ts`: Define custom markdown transformers.269 - `code-runners.ts`: Define custom code runners for Monaco.270- `snippets/`: Code snippets for importing.271- `index.html`: Inject content into the main HTML file (`<head>` and `<body>` injections).272- `vite.config.ts`: Extend Vite configuration (merged with Slidev's config).273274### Configuring the Application275276- **Vite:** Extend Vite config in `vite.config.ts`. Configure internal plugins via `slidev` field. Add custom plugins based on slide data in `./setup/vite-plugins.ts` using `defineVitePluginsSetup`.277- **Vue App:** Extend the Vue application instance in `./setup/main.ts` using `defineAppSetup` to add plugins, global components, or perform initializations.278- **Routes:** Add custom pages to the presentation build by configuring routes in `./setup/routes.ts` using `defineRoutesSetup`. Useful for adding landing pages, appendixes, or interactive demos outside the main slide flow.279280### Extending Functionality with Addons281282Addons are npm packages (`slidev-addon-*`) that extend Slidev's features. Use them via the `addons` headmatter option. Explore the [Addon Gallery](https://sli.dev/resources/addon-gallery). Write your own addons using the same directory structure and setup files as a Slidev project to share reusable components, layouts, or configurations.283284## 5. Building and Hosting High-Quality Outputs285286Prepare your presentation for sharing and deployment.287288### Building as a SPA289290Build your slides into a static SPA using `slidev build`. Configure the base path (`--base`) for subpath deployment and output directory (`--out`). Build multiple decks at once by providing multiple markdown files.291292### Exporting to Various Formats293294Export to PDF, PPTX, PNG, or Markdown using `slidev export`. Install `playwright-chromium`. Use options like `--with-clicks` to export each click step, `--range` to export specific slides, `--dark` for dark mode export, `--timeout` and `--wait` for handling complex slides, `--executable-path` for specifying a browser executable, `--with-toc` for PDF outline, and `--omit-background` for transparent PNGs. Troubleshoot missing content (increase `--wait`) or broken emojis (install fonts).295296**Browser Exporter:** Use the built-in UI at `/export` for interactive exporting with a live preview.297298### Hosting299300Deploy the built SPA (`dist` folder) to static hosting services like GitHub Pages, Netlify, or Vercel. Configuration files (`netlify.toml`, `vercel.json`, GitHub Actions workflow) are often included in starter templates. Host on Docker using provided images or by building your own Dockerfile.301302## Conclusion: Crafting Your Masterpiece303304Slidev provides a flexible and powerful platform for creating advanced, high-quality presentations. By mastering its syntax, leveraging its features for interactivity and visual appeal, and exploring its customization options, you can create presentations that are not only informative but also engaging and memorable. Focus on clear content, thoughtful design, and strategic use of interactive elements to make your Slidev presentations truly stand out. Utilize the advanced features like custom layouts, components, animations, code blocks, and customization options to tailor your presentation to your specific needs and audience. Remember to organize your project well and leverage the power of themes and addons for reusability and enhanced functionality.305
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| cline/prompts.clinerules/ai-dlc-adaptive-workflow.md · 1.2k | Cline rules | agent-behaviour | 54/100 | today | |
| cline/prompts.clinerules/audio-plugin-developer.md · 1.2k | Cline rules | styleperformancedo-notagent-behaviour | 57/100 | today | |
| cline/prompts.clinerules/ba.md · 1.2k | Cline rules | archgitagent-behaviour | 50/100 | today | |
| cline/prompts.clinerules/baby-steps.md · 1.2k | Cline rules | do-notagent-behaviour | 50/100 | today | |
| cline/prompts.clinerules/c#-guide.md · 1.2k | Cline rules | style | 27/100 | today | |
| cline/prompts.clinerules/claude-code-subagents.md · 1.2k | Cline rules | testarchdo-notagent-behaviour | 77/100 | today | |
| cline/prompts.clinerules/cline-architecture.md · 1.2k | Cline rules | archtypesapi | 54/100 | today | |
| cline/prompts.clinerules/cline-continuous-improvement-protocol.md · 1.2k | Cline rules | testgitperformance | 58/100 | today | |
| cline/prompts.clinerules/cline-for-research.md · 1.2k | Cline rules | agent-behaviour | 34/100 | today | |
| cline/prompts.clinerules/cline-for-slides.md · 1.2k | Cline rules | setupbuildstylearch+1 | 86/100 | today | |
| cline/prompts.clinerules/cline-for-webdev-ui.md · 1.2k | Cline rules | archagent-behaviour | 58/100 | today | |
| cline/prompts.clinerules/code-review.md · 1.2k | Cline rules | lint-formatgitsecurityperformance | 48/100 | today | |
| cline/prompts.clinerules/codebase-onboarding.md · 1.2k | Cline rules | lint-formatstylearchdependencies | 56/100 | today | |
| cline/prompts.clinerules/create-documentation.md · 1.2k | Cline rules | apidocs | 44/100 | today | |
| cline/prompts.clinerules/gemini-comprehensive-software-engineering-guide.md · 1.2k | Cline rules | buildstyletesting-strategysecurity+4 | 36/100 | today | |
| cline/prompts.clinerules/general-development-rules.md · 1.2k | Cline rules | stylegitdeploymentdo-not | 73/100 | today | |
| cline/prompts.clinerules/google-apps-script-developer.md · 1.2k | Cline rules | setupstylegitsecurity+3 | 66/100 | today | |
| cline/prompts.clinerules/helm-chart-developer.md · 1.2k | Cline rules | setuplint-formatstylearch+6 | 81/100 | today | |
| cline/prompts.clinerules/mcp-development-protocol.md · 1.2k | Cline rules | setupteststyle | 73/100 | today | |
| cline/prompts.clinerules/mcp_env_configuration.md · 1.2k | Cline rules | setupstylearchsecurity+1 | 77/100 | today |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/cline-prompts-clinerules-comprehensive-slide-dev-guide)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.