AisCard

A card is a flexible and extensible content container. It includes options for headers and footers, a wide variety of content, contextual background colors, and powerful display options. They are built with as little markup and styles as possible, but still manage to deliver a ton of control and customization. They have no fixed width to start, so they'll naturally fill the full width of its parent element.

Test Header
This is the body of the card.
No Footer
This is the body of the card.
No header or footer.

Icon & Status

Use icon and status props to easily customize your card header. Likewise, you can use footer-icon and footer-status to easily customize your card footer.

Header with icon
This is the body of the card.
Header with status
This is the body of the card.

Rounded

Use icon and status props to easily customize your card header. Likewise, you can use footer-icon and footer-status to easily customize your card footer.

Try the different rounded options
This is the body of the card.

Align

To align the content of the card set the align prop to left, center or right. The default is left.

Left
This is the body of the card.
Center
This is the body of the card.
Right
This is the body of the card.

Variants

Default
This is the body of the card.
Primary
This is the body of the card.
Secondary
This is the body of the card.
Info
This is the body of the card.
Success
This is the body of the card.
Danger
This is the body of the card.
Warning
This is the body of the card.
Plain
This is the body of the card.

Outline

Default
This is the body of the card.
Primary
This is the body of the card.
Secondary
This is the body of the card.
Info
This is the body of the card.
Success
This is the body of the card.
Danger
This is the body of the card.
Warning
This is the body of the card.
Plain
This is the body of the card.

Using Slots

For custom content use the header and/or footer slots.

  Custom Header
This is the body of the card.
  Attachments
This is the body of the card.

Or just customize the right side of the header and/or footer with the headerRight and/or footerRight slots.

Standard header
23
This is the body of the card.

Collapsible

Set the collapsible prop to be able to expand/collapse the card by clicking anywhere on the card header. Set the collapse-arrow boolean prop to have a dynamic leading arrow in your header.

Set the default-open prop to false to have the card start out collapsed. Each click of the header will emit a click event, passing the open state.

Click on the header to expand/collapse the body and footer.

no-body

Use the no-body prop to remove the use of a AisCardBody inside of the card. This can be useful when you want to nest something within a card without any padding or margin, like a table or list group.

Table

Add flush to the AisTable and no-body to the AisCard to remove all padding/margin between the card and the table.

Team Roster
Hawk ID
Univ ID
First Name
Last Name
Email
bbrn00231723BenOBrienbenjamin-t-obrien@uiowa.edu
dcrall87654321DennyCralldennis-crall@uiowa.edu
LatrenaCooper1801110018LatrenaCooperLatrena-Cooper@uiowa.edu
GrayCooper501110005GrayCooperGray-Cooper@uiowa.edu
bhanks12345678BrendanHanksbrendan-hanks@uiowa.edu

Table w/ Sticky Headers

For a table with many rows you can nest it with the sticky-headers prop to minimize the overall height of the card. Just wrap your table in a div with a max-height set and overflow-y-auto set.

Team Roster
Hawk ID
Univ ID
First Name
Last Name
Email
bbrn00231723BenOBrienbenjamin-t-obrien@uiowa.edu
dcrall87654321DennyCralldennis-crall@uiowa.edu
LatrenaCooper1801110018LatrenaCooperLatrena-Cooper@uiowa.edu
GrayCooper501110005GrayCooperGray-Cooper@uiowa.edu
bhanks12345678BrendanHanksbrendan-hanks@uiowa.edu
rmiller00123456RossMillerross-miller@uiowa.edu
SilvieKelly301110003SilvieKellySilvie-Kelly@uiowa.edu
DarbMorales401110004DarbMoralesDarb-Morales@uiowa.edu
SenaWilson601110006SenaWilsonSena-Wilson@uiowa.edu
BevHoward701110007BevHowardBev-Howard@uiowa.edu
EbonyAllen801110008EbonyAllenEbony-Allen@uiowa.edu
FranciskaJohnson901110009FranciskaJohnsonFranciska-Johnson@uiowa.edu
ShoshanaWalker1001110010ShoshanaWalkerShoshana-Walker@uiowa.edu
SamanthaKelly1101110011SamanthaKellySamantha-Kelly@uiowa.edu
LissaLopez1201110012LissaLopezLissa-Lopez@uiowa.edu
KayleePrice1301110013KayleePriceKaylee-Price@uiowa.edu
BeverleeTorres1401110014BeverleeTorresBeverlee-Torres@uiowa.edu
TheresaJimenez1501110015TheresaJimenezTheresa-Jimenez@uiowa.edu
MaxiLopez1601110016MaxiLopezMaxi-Lopez@uiowa.edu
FayinaJames1701110017FayinaJamesFayina-James@uiowa.edu
Jo AnnCarter1901110019Jo AnnCarterJo Ann-Carter@uiowa.edu
DannaWatson2001110020DannaWatsonDanna-Watson@uiowa.edu
BirgittaStewart2101110021BirgittaStewartBirgitta-Stewart@uiowa.edu
NatalieFlores2201110022NatalieFloresNatalie-Flores@uiowa.edu
EolandaHill2301110023EolandaHillEolanda-Hill@uiowa.edu
RupertaNguyen2401110024RupertaNguyenRuperta-Nguyen@uiowa.edu
MaddalenaAllen2501110025MaddalenaAllenMaddalena-Allen@uiowa.edu
CaseyFlores2601110026CaseyFloresCasey-Flores@uiowa.edu
GeorgiannaSanchez2701110027GeorgiannaSanchezGeorgianna-Sanchez@uiowa.edu
CaitrinBrown2801110028CaitrinBrownCaitrin-Brown@uiowa.edu
RobinaAnderson2901110029RobinaAndersonRobina-Anderson@uiowa.edu
ElnoraWilliams3001110030ElnoraWilliamsElnora-Williams@uiowa.edu

Key-Value Example

An example key/value table nested flush in a no-body card, built manually with html table by adding ais, flush, and table-ruled classes.

Random Team Member
Hawk IDBevHoward7
Univ ID01110007
First NameBev
Last NameHoward
EmailBev-Howard@uiowa.edu

List Group

For a table with many rows you can nest it with the sticky-headers prop to minimize the overall height of the card. Just wrap your table in a div with a max-height set and overflow-y-auto set.

Card with flush list group
List Group Item #1
List Group Item #2
List Group Item #3
List Group Item #4
Card with flush list group and a card body
List Group Item #1
List Group Item #2
List Group Item #3
List Group Item #4
Quis magna Lorem anim amet ipsum do mollit sit cillum voluptate ex nulla tempor. Laborum consequat non elit enim exercitation cillum aliqua consequat id aliqua. Esse ex consectetur mollit voluptate est in duis laboris ad sit ipsum anim Lorem.

Events

Bind to @click to handle the card's click event. Bind to @header-click event to handle the card header's click event.

Card Events
Click on the card header to trigger a header-click event.
Click anywhere on the card to trigger a click event.

Component Reference

Props

Property
1
Type(s)
Description
Required
Default
align
String
Text alignment for the card's content
Valid values:
left, center or right
'left'
bodyClass
Array, Object, String
CSS class (or classes) to apply to the body
''
collapseArrow
Boolean
Set the collapse-arrow boolean prop to have a dynamic leading arrow in your header.
undefined
collapsible
Boolean
Set the collapsible prop to be able to expand/collapse the card by clicking anywhere on the card header.
undefined
defaultOpen
Boolean
Set the default-open prop to false to have the card start out collapsed.
true
footer
String
Text content to place in the footer
''
footerClass
Array, Object, String
CSS class (or classes) to apply to the footer
''
footerIcon
Undefined
Optional footer icon. Accepts either an object imported from the FontAwesome icon packs or a string specifying one of the preloaded, core icons
undefined
footerIconClass
Array, Object, String
Adds class(es) to the footer icon
''
footerStatus
String
Optional icon on the right side of the footer to indicate the logical state of the card
Valid values:
busy, success, error, required
undefined
footerStatusClass
Array, Object, String
Adds class(es) to the footer status icon
''
header
String
Text content to place in the header
''
headerClass
Array, Object, String
CSS class (or classes) to apply to the header
''
icon
Undefined
Optional header icon. Accepts either an object imported from the FontAwesome icon packs or a string specifying one of the preloaded, core icons
undefined
iconClass
Array, Object, String
Adds class(es) to the header icon
''
noBody
Boolean
Disable rendering of the default inner card-body element
false
outline
Boolean
Applies one of the theme color variants to the border instead of the background.
false
rounded
Boolean, String
Applies rounded corners using TailwindCSS's rounded classes
undefined
status
String
Optional icon on the right side of the header to indicate the logical state of the card
Valid values:
busy, success, error, required
undefined
statusClass
Array, Object, String
Adds class(es) to the header status icon
''
variant
String
Applies one of the theme color variants to the component
Valid values:
primary, secondary, default, info, success, warning, danger, plain
undefined

Slots

Name
1
Scoped
Description
default
Scoped slot for custom rendering the card body
footer
Scoped slot for custom rendering the card footer
footerRight
Scoped slot for custom rendering the right side of the card footer.
Note: this slot will be ignored if the footer slot is used.
header
Scoped slot for custom rendering the card header
headerRight
Scoped slot for custom rendering the right side of the card header.

Events

Event
1
Arguments
Description
click
  • event
    object
    -
    Native event object
Emitted when the card is clicked
header-click
  • open
    boolean
    -
    The open state of the card
  • event
    object
    -
    Native event object
Emitted when the card header is clicked