Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/guide/components/slots.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,12 +298,12 @@ function BaseLayout(slots) {

## Conditional Slots {#conditional-slots}

Sometimes you want to render something based on whether or not a slot is present.
Sometimes you want to render something based on whether or not content has been passed to a slot.

You can use the [$slots](/api/component-instance.html#slots) property in combination with a [v-if](/guide/essentials/conditional.html#v-if) to achieve this.

In the example below we define a Card component with three conditional slots: `header`, `footer` and the `default` one.
When the header / footer / default is present we want to wrap them to provide additional styling:
When content for the header / footer / default is present, we want to wrap it to provide additional styling:

```vue-html
<template>
Expand Down