SkyLineCSS provides utility classes to create flexible and responsive cards for displaying content. Cards are a popular UI component for organizing and presenting information in a structured format.
Basic Card
To create a basic card, use the .card class:
<divclass="card"> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This is a basic card with some text content.</p> </div></div>
Card with Image
You can include an image in the card using the .card-img-top class:
<divclass="card"> <imgsrc="image.jpg"class="card-img-top"alt="Card Image"> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This card includes an image at the top.</p> </div></div>
Card with Links and Buttons
You can add links and buttons inside the card body:
You can add headers and footers to the card using the .card-header and .card-footer classes:
<divclass="card"> <divclass="card-header"> Featured </div> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This card includes a header.</p> </div> <divclass="card-footer"> Footer content </div></div>
Card Borders
You can add borders to the card using the .border class:
<divclass="card border"> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This card has a border.</p> </div></div>
Card Colors
SkyLineCSS provides predefined color classes for cards:
.bg-primary: Primary background color
.bg-secondary: Secondary background color
.bg-success: Success background color
.bg-danger: Danger background color
.bg-warning: Warning background color
Example:
<divclass="card bg-primary"> <divclass="card-body"> <h5class="card-title">Primary Card</h5> <pclass="card-text">This card has a primary background color.</p> </div></div><divclass="card bg-success"> <divclass="card-body"> <h5class="card-title">Success Card</h5> <pclass="card-text">This card has a success background color.</p> </div></div>
Card Shadows
You can add shadows to the card using the .shadow and .shadow-md classes:
<divclass="card shadow"> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This card has a shadow.</p> </div></div><divclass="card shadow-md"> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This card has a medium shadow.</p> </div></div>
Responsive Cards
You can make cards responsive using the .card-deck and .card-columns classes:
<divclass="card-deck"><!-- Cards displayed in a deck --></div><divclass="card-columns"><!-- Cards displayed in multiple columns --></div>
Complete Example
Here's a complete example combining different card styles:
<divclass="card bg-primary text-white"> <divclass="card-header"> Featured </div> <divclass="card-body"> <h5class="card-title">Primary Card Title</h5> <pclass="card-text">This card has a primary background color.</p> <ahref="#"class="btn btn-outline-light">Button</a> </div></div><divclass="card shadow mt-4"> <imgsrc="image.jpg"class="card-img-top"alt="Card Image"> <divclass="card-body"> <h5class="card-title">Card with Image</h5> <pclass="card-text">This card includes an image with a shadow.</p> <ahref="#"class="btn btn-primary">Button</a> </div></div>
These are some of the available card styling utilities in SkyLineCSS. You can combine these classes to create stylish and responsive cards for your projects.
I assume you're asking for a dark mode version of the documentation for cards. Here's how you can modify the cards.md file for dark mode:
docs/cards.md (Dark Mode)
Cards
SkyLineCSS provides utility classes to create flexible and responsive cards for displaying content. Cards are a popular UI component for organizing and presenting information in a structured format.
Basic Card
To create a basic card, use the .card class:
<divclass="card bg-gray-800 text-white"> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This is a basic card with some text content.</p> </div></div>
Card with Image
You can include an image in the card using the .card-img-top class:
<divclass="card bg-gray-800 text-white"> <imgsrc="image.jpg"class="card-img-top"alt="Card Image"> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This card includes an image at the top.</p> </div></div>
Card with Links and Buttons
You can add links and buttons inside the card body:
You can add headers and footers to the card using the .card-header and .card-footer classes:
<divclass="card bg-gray-800 text-white"> <divclass="card-header bg-gray-700"> Featured </div> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This card includes a header.</p> </div> <divclass="card-footer bg-gray-700"> Footer content </div></div>
Card Borders
You can add borders to the card using the .border class:
<divclass="card bg-gray-800 text-white border border-purple-600"> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This card has a border.</p> </div></div>
Card Colors
SkyLineCSS provides predefined color classes for cards:
.bg-primary: Primary background color
.bg-secondary: Secondary background color
.bg-success: Success background color
.bg-danger: Danger background color
.bg-warning: Warning background color
Example:
<divclass="card bg-primary text-white"> <divclass="card-body"> <h5class="card-title">Primary Card</h5> <pclass="card-text">This card has a primary background color.</p> </div></div><divclass="card bg-success text-white"> <divclass="card-body"> <h5class="card-title">Success Card</h5> <pclass="card-text">This card has a success background color.</p> </div></div>
Card Shadows
You can add shadows to the card using the .shadow and .shadow-md classes:
<divclass="card bg-gray-800 text-white shadow"> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This card has a shadow.</p> </div></div><divclass="card bg-gray-800 text-white shadow-md"> <divclass="card-body"> <h5class="card-title">Card Title</h5> <pclass="card-text">This card has a medium shadow.</p> </div></div>
Responsive Cards
You can make cards responsive using the .card-deck and .card-columns classes:
<divclass="card-deck"><!-- Cards displayed in a deck --></div><divclass="card-columns"><!-- Cards displayed in multiple columns --></div>
Complete Example
Here's a complete example combining different card styles:
<divclass="card bg-gray-900 text-white"> <divclass="card-header bg-gray-800"> Featured </div> <divclass="card-body"> <h5class="card-title">Primary Card Title</h5> <pclass="card-text">This card has a primary background color.</p> <ahref="#"class="btn btn-outline-purple">Button</a> </div></div><divclass="card bg-gray-800 text-white shadow mt-4"> <imgsrc="image.jpg"class="card-img-top"alt="Card Image"> <divclass="card-body"> <h5class="card-title">Card with Image</h5> <pclass="card-text">This card includes an image with a shadow.</p> <ahref="#"class="btn btn-primary">Button</a> </div></div>
These are some of the available card styling utilities in SkyLineCSS. You can combine these classes to create stylish and responsive cards for your projects in dark mode.