Skip to content

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. Or if you need full control of body markup/styling or advanced accessibility semantics. See AisCardBody for details.

Table ​

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

Team Roster
Hawk ID
Univ ID
First Name
Last Name
Email
r2d279599133r2-d2@uiowa.edu
c3po70372677c3-po@uiowa.edu
LatrenaCooper1873824566LatrenaCooperLatrena-Cooper@uiowa.edu
GrayCooper570135927GrayCooperGray-Cooper@uiowa.edu
hansolo73243814han-solo@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
r2d279599133r2-d2@uiowa.edu
c3po70372677c3-po@uiowa.edu
LatrenaCooper1873824566LatrenaCooperLatrena-Cooper@uiowa.edu
GrayCooper570135927GrayCooperGray-Cooper@uiowa.edu
hansolo73243814han-solo@uiowa.edu
skywalker76949520luke-skywalker@uiowa.edu
SilvieKelly372118619SilvieKellySilvie-Kelly@uiowa.edu
DarbMorales475833755DarbMoralesDarb-Morales@uiowa.edu
SenaWilson670045243SenaWilsonSena-Wilson@uiowa.edu
BevHoward776159918BevHowardBev-Howard@uiowa.edu
EbonyAllen871862903EbonyAllenEbony-Allen@uiowa.edu
FranciskaJohnson972523333FranciskaJohnsonFranciska-Johnson@uiowa.edu
ShoshanaWalker1073626559ShoshanaWalkerShoshana-Walker@uiowa.edu
SamanthaKelly1177488958SamanthaKellySamantha-Kelly@uiowa.edu
LissaLopez1277011250LissaLopezLissa-Lopez@uiowa.edu
KayleePrice1375740742KayleePriceKaylee-Price@uiowa.edu
BeverleeTorres1470715142BeverleeTorresBeverlee-Torres@uiowa.edu
TheresaJimenez1575597482TheresaJimenezTheresa-Jimenez@uiowa.edu
MaxiLopez1674648276MaxiLopezMaxi-Lopez@uiowa.edu
FayinaJames1775542451FayinaJamesFayina-James@uiowa.edu
Jo AnnCarter1977062487Jo AnnCarterJo Ann-Carter@uiowa.edu
DannaWatson2076192026DannaWatsonDanna-Watson@uiowa.edu
BirgittaStewart2179435202BirgittaStewartBirgitta-Stewart@uiowa.edu
NatalieFlores2274784953NatalieFloresNatalie-Flores@uiowa.edu
EolandaHill2372896251EolandaHillEolanda-Hill@uiowa.edu
RupertaNguyen2475824037RupertaNguyenRuperta-Nguyen@uiowa.edu
MaddalenaAllen2571264948MaddalenaAllenMaddalena-Allen@uiowa.edu
CaseyFlores2679768499CaseyFloresCasey-Flores@uiowa.edu
GeorgiannaSanchez2770676563GeorgiannaSanchezGeorgianna-Sanchez@uiowa.edu
CaitrinBrown2878760977CaitrinBrownCaitrin-Brown@uiowa.edu
RobinaAnderson2970590620RobinaAndersonRobina-Anderson@uiowa.edu
ElnoraWilliams3075062841ElnoraWilliamsElnora-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 IDLissaLopez12
Univ ID77011250
First NameLissa
Last NameLopez
EmailLissa-Lopez@uiowa.edu

List Group ​

Add flush to AisListGroup and no-body to AisCard to remove all padding/margin between the card and the list group.

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.

Advanced Accessibility ​

By default, AisCard handles common scroll-region accessibility for the built-in body wrapper by adding tabindex="0" when overflow is scrollable.

For advanced cases (more specific aria-*, role, or custom tabindex), use no-body and add your own AisCardBody inside the default slot.

vue
<AisCard no-body header="Search Results">
  <AisCardBody
    class="max-h-64 overflow-auto"
    role="region"
    aria-label="Search results list"
    tabindex="-1"
  >
    <!-- custom content -->
  </AisCardBody>
</AisCard>

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
Type(s)
Required
Default
Description
Deprecated
align
String
'left'
Text alignment for the card's content
Valid values:
left, center or right
false
bodyClass
Array, Object, String
''
CSS class (or classes) to apply to the body
false
collapseArrow
Boolean
undefined
Set the collapse-arrow boolean prop to have a dynamic leading arrow in your header.
false
collapsible
Boolean
undefined
Set the collapsible prop to be able to expand/collapse the card by clicking anywhere on the card header.
false
defaultOpen
Boolean
true
Set the default-open prop to false to have the card start out collapsed.
false
footer
String
''
Text content to place in the footer
false
footerClass
Array, Object, String
''
CSS class (or classes) to apply to the footer
false
footerIcon
Undefined
undefined
Optional footer icon. Accepts either an object imported from the FontAwesome icon packs or a string specifying one of the preloaded, core icons
false
footerIconClass
Array, Object, String
''
Adds class(es) to the footer icon
false
footerStatus
String
undefined
Optional icon on the right side of the footer to indicate the logical state of the card
Valid values:
busy, success, error, required
false
footerStatusClass
Array, Object, String
''
Adds class(es) to the footer status icon
false
header
String
''
Text content to place in the header
false
headerClass
Array, Object, String
''
CSS class (or classes) to apply to the header
false
icon
Undefined
undefined
Optional header icon. Accepts either an object imported from the FontAwesome icon packs or a string specifying one of the preloaded, core icons
false
iconClass
Array, Object, String
''
Adds class(es) to the header icon
false
noBody
Boolean
false
Disable rendering of the default inner card-body element
false
outline
Boolean
false
Applies one of the theme color variants to the border instead of the background.
false
rounded
Boolean, String
undefined
Applies rounded corners using TailwindCSS's rounded classes
false
roundedBreakpoint
String
undefined
Limit rounding configuration to the specified breakpoint and above. This is not intended for general use but rather for internal customization. It allows AisCard to be full-screen edge-to-edge in a mobile view. This is used in AisModal.
false
status
String
undefined
Optional icon on the right side of the header to indicate the logical state of the card
Valid values:
busy, success, error, required
false
statusClass
Array, Object, String
''
Adds class(es) to the header status icon
false
variant
String
undefined
Applies one of the theme color variants to the component
Valid values:
primary, secondary, default, info, success, warning, danger, plain
false

Slots ​

Name
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
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