Skip to content

Default Layout

0phoff edited this page Nov 17, 2023 · 2 revisions

The default layout is used for most of your slides and -as its name implies- is used whenever you do not specify a layout for your slide.

Arguments

Name Type Description Default
color String Which color to setup as slidev-theme-primary for that slide kul-blue-600
content-class String CSS classes to add to the ::content:: slot wrapper div

Slots

::content::

The wrapper element around this slot automatically grows to take up all the remaining space of your slide. This allows you to more easily place your content where you want it. You can read more about the difference between the ::default:: and ::content:: slots here.

HINT
It is fairly straightforward to place your ::content:: by applying some UnoCSS classes through the content-class argument. In fact, that is exactly how a lot of the other layouts were made (eg. cluster, column, pile, stack). Feel free to use these predefined layouts are construct your own!

::footer::

This slot allows you to add some text in the footer (next to the eavise icon). By default the text is slightly smaller and colored similarly to the rest of the footer, though it is easily overridable by providing your own styles for :deep(.slot-footer).

Examples

Default

default-default

---

# Slide Title
*inline content*  
If you add two spaces after a line it will add a `<br />`.
Tempor culpa minim tempor culpa nisi Lorem ad.

- lists
- are 
- great

---
Minimal

default-minimal

<!-- Set `style: minimal` in the top frontmatter -->

---

# Slide Title
*inline content*  
If you add two spaces after a line it will add a `<br />`.
Tempor culpa minim tempor culpa nisi Lorem ad.

- lists
- are 
- great

---
Content Slot

default-content

---
content-class: flex flex-col text-center justify-center
---

# Slide Title
::content::

We center the slot content by using `display: flex`.  
Tempor culpa minim tempor culpa nisi Lorem ad.

---
Footer Slot

default-footer

---

# Slide Title
*inline content*

::footer::
This is a footer text  
Two lines is probably the maximum that fits well in here...

---