@@ -28,8 +28,9 @@ The Card can accommodate the following elements:
2828
2929* [ Header] ( #header )
3030* [ Body] ( #body )
31+ * [ Footer] ( #footer )
3132* [ Actions] ( #actions )
32- * [ Images ] ( #images )
33+ * [ Media ] ( #media )
3334* [ Separators] ( #separators )
3435
3536### Header
@@ -81,6 +82,18 @@ The main content of a card is the body which can be defined through the `.k-card
8182</div>
8283```
8384
85+ ### Footer
86+
87+ The main content of a card is the body which can be defined through the ` .k-card-body ` class.
88+
89+ ``` dojo
90+ <div class="k-card" style="width: 300px;">
91+ <div class="k-card-footer">
92+ <span>Card Footer</span>
93+ </div>
94+ </div>
95+ ```
96+
8497### Actions
8598
8699You can add a list of actions to a Card by using the ` .k-card-actions ` class.
@@ -120,7 +133,7 @@ To achieve a consistent styling, each action can be wrapped in a `.k-card-action
120133</div>
121134```
122135
123- The actions can be stretched to take the entire container by adding the ` .k-card-actions-stretched ` .
136+ The actions can be stretched to take the entire container by adding the ` .k-card-actions-stretched ` class .
124137
125138``` dojo
126139<div class="k-card" style="width: 300px;">
@@ -140,6 +153,66 @@ The actions can be stretched to take the entire container by adding the `.k-card
140153</div>
141154```
142155
156+ The actions can be centered inside the container by adding the ` .k-card-actions-center ` class:
157+
158+ ``` dojo
159+ <div class="k-card" style="width: 300px;">
160+ <div class="k-card-body">
161+ <h5 class="k-card-title">Card Title</h5>
162+ <h6 class="k-card-subtitle">Card Subtitle</h6>
163+ <p>Some quick example text to build on the card title and make up the bulk of the card content.</p>
164+ </div>
165+ <div class="k-card-actions k-card-actions-center">
166+ <span class="k-card-action">
167+ <span class="k-button k-flat k-primary">Action 1</span>
168+ </span>
169+ <span class="k-card-action">
170+ <span class="k-button k-flat k-primary">Action 2</span>
171+ </span>
172+ </div>
173+ </div>
174+ ```
175+
176+ The actions can be aligned at the start of the container with the ` .k-card-actions-start ` class:
177+
178+ ``` dojo
179+ <div class="k-card" style="width: 300px;">
180+ <div class="k-card-body">
181+ <h5 class="k-card-title">Card Title</h5>
182+ <h6 class="k-card-subtitle">Card Subtitle</h6>
183+ <p>Some quick example text to build on the card title and make up the bulk of the card content.</p>
184+ </div>
185+ <div class="k-card-actions k-card-actions-start">
186+ <span class="k-card-action">
187+ <span class="k-button k-flat k-primary">Action 1</span>
188+ </span>
189+ <span class="k-card-action">
190+ <span class="k-button k-flat k-primary">Action 2</span>
191+ </span>
192+ </div>
193+ </div>
194+ ```
195+
196+ The actions can be aligned at the end of the container with the ` .k-card-actions-end ` class:
197+
198+ ``` dojo
199+ <div class="k-card" style="width: 300px;">
200+ <div class="k-card-body">
201+ <h5 class="k-card-title">Card Title</h5>
202+ <h6 class="k-card-subtitle">Card Subtitle</h6>
203+ <p>Some quick example text to build on the card title and make up the bulk of the card content.</p>
204+ </div>
205+ <div class="k-card-actions k-card-actions-end">
206+ <span class="k-card-action">
207+ <span class="k-button k-flat k-primary">Action 1</span>
208+ </span>
209+ <span class="k-card-action">
210+ <span class="k-button k-flat k-primary">Action 2</span>
211+ </span>
212+ </div>
213+ </div>
214+ ```
215+
143216The actions can also be forced to display vertically through the ` .k-card-actions-vertical ` class.
144217
145218``` dojo
@@ -156,9 +229,11 @@ The actions can also be forced to display vertically through the `.k-card-action
156229</div>
157230```
158231
159- ### Images
232+ ### Media
160233
161- Cards support images through the ` .k-card-image ` class.
234+ The Cards allows you to display an image or video within its content.
235+
236+ Images can be added through the ` .k-card-image ` class.
162237
163238```
164239<div class="k-card" style="width: 300px;">
@@ -172,9 +247,29 @@ Cards support images through the `.k-card-image` class.
172247</div>
173248```
174249
250+ Videos can be added through the ` .k-card-media ` class.
251+
252+ ```
253+ <div class="k-card k-card-vertical">
254+ <div class="k-card-header k-display-flex k-align-items-center ">
255+ <h5 class="k-card-title">DevReach</h5>
256+ </div>
257+ <iframe height="267" src="https://www.youtube.com/embed/00EMMRFocNs" class="k-card-media"></iframe>
258+ <div class="k-card-body">
259+ <p><strong>DevReach 2019 Day 2 Morning Keynote:</strong> Technical Leadership: Lessons Learned at NASA with Jody Davis</p>
260+ </div>
261+ <span class="k-card-separator"></span>
262+ <div class="k-card-actions">
263+ <span class="k-button k-flat k-button-icon"><span class="k-icon k-i-heart-outline"></span></span>
264+ <span class="k-button k-flat k-button-icon"><span class="k-icon k-i-comment"></span></span>
265+ <span class="k-button k-flat k-button-icon"><span class="k-icon k-i-share"></span></span>
266+ </div>
267+ </div>
268+ ```
269+
175270### Separators
176271
177- To include Card separators, use the ` .k-hr ` class.
272+ To include Card separators, use the ` .k-card-separator ` class.
178273
179274``` dojo
180275<div class="k-card" style="width: 300px;">
@@ -184,7 +279,7 @@ To include Card separators, use the `.k-hr` class.
184279 <h6 class="k-card-subtitle">Card Subtitle</h6>
185280 <p>Some quick example text to build on the card title and make up the bulk of the card content.</p>
186281 </div>
187- <hr class="k-hr " />
282+ <hr class="k-card-separator " />
188283 <div class="k-card-body">
189284 <h5 class="k-card-title">Card Title</h5>
190285 <h6 class="k-card-subtitle">Card Subtitle</h6>
@@ -194,6 +289,8 @@ To include Card separators, use the `.k-hr` class.
194289</div>
195290```
196291
292+ To specify a vertical orientation for the separator add the ` .k-card-separator-vertical ` class to the separator element.
293+
197294## Layout
198295
199296Cards expose additional classes that are used for laying out series of cards.
@@ -324,6 +421,68 @@ To render Cards that are detached from one another on a single row, use the `.k-
324421 </div>
325422```
326423
424+ ### Custom layout
425+
426+ Positioning a horizontal flex container element inside the card could be achieved with the ` .k-hbox ` class:
427+
428+ ```
429+ <div class="k-card k-card-horizontal">
430+ <div class="k-card-header">
431+ <h5 class="k-card-title">Card Title</h5>
432+ <h6 class="k-card-subtitle">Card Subtitle</h6>
433+ </div>
434+ <div class="k-hbox">
435+ <div class="k-card-body">
436+ <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
437+ </div>
438+ <div class="k-card-actions k-card-actions-stretched k-card-actions-horizontal">
439+ <span class="k-button k-flat">Action 1</span>
440+ <span class="k-button k-flat k-primary">Action 2</span>
441+ </div>
442+ </div>
443+ </div>
444+ ```
445+
446+ Positioning a vertical flex container element inside the card could be achieved with the ` .k-vbox ` class:
447+
448+ ```
449+ <div class="k-card k-card-horizontal">
450+ <div class="k-vbox">
451+ <div class="k-card-header">
452+ <h5 class="k-card-title">Card Title</h5>
453+ <h6 class="k-card-subtitle">Card Subtitle</h6>
454+ </div>
455+ <div class="k-card-body">
456+ <p>Some quick example text to build on the card title and make up the bulk of the card's content.</p>
457+ </div>
458+ <div class="k-card-actions k-card-actions-stretched k-card-actions-horizontal">
459+ <span class="k-button k-flat">Action 1</span>
460+ <span class="k-button k-flat k-primary">Action 2</span>
461+ </div>
462+ </div>
463+ </div>
464+ ```
465+
466+ ### Orientation
467+
468+ The Card content can be arranged vertically or horizontally through the ` .k-card-vertical ` and ` .k-card-horizontal ` classes:
469+
470+ ```
471+ <div class="k-card k-card-vertical k-text-center">
472+ <div class="k-card-header">
473+ <h5 class="k-card-title">Sofia</h5>
474+ <h6 class="k-card-subtitle">Sunny</h6>
475+ </div>
476+ <div class="k-card-body">
477+ <div>2ºC</div>
478+ </div>
479+ <div class="k-card-actions k-card-actions-stretched k-card-actions-horizontal">
480+ <button class="k-button k-flat">Action 1</button>
481+ <button class="k-button k-primary k-flat">Action 2</button>
482+ </div>
483+ </div>
484+ ```
485+
327486## Styles
328487
329488Cards provide predefined state classes that you can use to change the Card appearance.
0 commit comments