An open API service indexing awesome lists of open source software.

https://github.com/amio/markdown-deck

A web component for presenters
https://github.com/amio/markdown-deck

markdown ppt presentation slides web-component

Last synced: 7 months ago
JSON representation

A web component for presenters

Awesome Lists containing this project

README

          

# <markdown-deck />

[![npm version][npm-src]][npm-href]
[![Bundle size][bundlephobia-src]][bundlephobia-href]
[![License][license-src]][license-href]

A web component for presenters.

- Auto screen fitting & keyboard navigation
- Mobile view & touch navigation
- Dark mode
- Print view
- Live editor

## Usage

1. Import script from https://unpkg.com/markdown-deck

```html

```

2. Put markdown content inside `` inside ``:

```html


# Title
---
## Hello World!
---
## The END


```

or set `markdown` attribute on ``:

```html

```

or load markdown file with `src` attribute:

```html

```

### Attributes

- `markdown="{string}"` the markdown to parse (override contents in `Space</kbd>
- __prev / next__: <kbd>⇦</kbd> / <kbd>⇨</kbd> or <kbd>J</kbd> / <kbd>L</kbd>
- __first / last__: <kbd>⇧</kbd> / <kbd>⇩</kbd>
- __invert color (dark theme)__: <kbd>I</kbd> or <kbd>D</kbd>
- __toggle print view__: <kbd>P</kbd>
- __toggle editor__: <kbd>ESC</kbd>

### Customization

- __Custom global styles__

Use `<style />` inside `<markdown-deck />` to apply custom styles:

```html
<markdown-deck>
<style>
img[src*="badgen.net"] { height: 40px }
</style>
</markdown-deck>
```

or load external css file with `css` attribute:

```html
<markdown-deck css="index.css"></markdown-deck>
```

- __Custom per-slide style__

Write `<style />` within markdown content:

```
# Title

<style>
.slide { background: url(...) }
.content { filter: invert() }
code { opacity: 0.8 }
</style>
```

## See Also

- [eloc][eloc-href]: Eloquence cli.

[npm-src]: https://badgen.net/npm/v/markdown-deck
[npm-href]: https://www.npmjs.com/package/markdown-deck
[bundlephobia-src]: https://badgen.net/bundlephobia/min/markdown-deck
[bundlephobia-href]: https://bundlephobia.com/result?p=markdown-deck
[license-src]: https://badgen.net/badge/license/MIT
[license-href]: LICENSE.md
[eloc-href]: https://github.com/amio/eloc