-
Notifications
You must be signed in to change notification settings - Fork 7
Embed
Mika Berglund edited this page Feb 28, 2020
·
3 revisions
The Embed component is used to create responsive video or slideshow embeds.
Embed : BootstrapComponentBase
| Name | Type | Description |
|---|---|---|
| AspectRatio | EmbedAspectRatio | Specifies different aspect ratios for the embedded content. The default is 16 by 9. |
| Source | string | The source URL of the content to embed. |
The examples below show you how to use the Embed component.
The simples way to show an embedded YouTube video.
<Embed Source="https://www.youtube.com/embed/MetcuX1OHD0" />You can also use a variable that specifies the source.
@code {
string source = "https://www.youtube.com/embed/MetcuX1OHD0";
}
<Embed Source="@source" />The embeds below demonstrate different aspect ratios supported by the Embed component. The aspect ratio defaults to 16 by 9.
@code {
string source = "https://www.youtube.com/embed/MetcuX1OHD0";
}
<Embed Source="@source" AspectRatio="EmbedAspectRatio.Ratio21by9" />
<Embed Source="@source" AspectRatio="EmbedAspectRatio.Ratio4by3" />
<Embed Source="@source" AspectRatio="EmbedAspectRatio.Ratio1by1" />- Home
- Design Principles
- Getting Started
- Components
- Content
- Layout Components
- Generic Elements
- Utilities
- Releases