Card

A box that groups related content. It is purely visual and does not change how content is read.

Storage
12 GB of 50 GB used
Flat card

Usage

Web (React)

<DotwearCard>
  <h2>Storage</h2>
  <p>12 GB of 50 GB used</p>
</DotwearCard>

<DotwearCard variant="flat">Nested</DotwearCard>

iOS (SwiftUI)

VStack(alignment: .leading, spacing: 8) {
    Text("Storage").font(.headline)
    Text("12 GB of 50 GB used")
}
.dotwearCard()           // .outlined (border + shadow)

Text("Nested")
    .dotwearCard(.flat)  // border only

React Native

<DotwearCard>
  <Text accessibilityRole="header">Storage</Text>
  <Text>12 GB of 50 GB used</Text>
</DotwearCard>

<DotwearCard variant="flat">
  <Text>Nested</Text>
</DotwearCard>

Flutter

DotwearCard(
  child: Column(
    crossAxisAlignment: CrossAxisAlignment.start,
    children: [
      Semantics(header: true, child: const Text('Storage')),
      const Text('12 GB of 50 GB used'),
    ],
  ),
),

const DotwearCard(variant: DotwearCardVariant.flat, child: Text('Nested')),

Variants

VariantUse for
outlinedBorder and shadow (default)
flatBorder only — e.g. a card inside a card

States

StateAppearance
—A card has no states. To make it tappable, put a standard button or link inside it

React API

PropDescription
variant="outlined""outlined" (default), "flat"
…div propsAny <div> attribute

SwiftUI API

APIDescription
.dotwearCard(_ variant: = .outlined)variant: .outlined .flat

React Native API

PropDescription
variant="outlined""outlined" (default), "flat"
…View propsAny View prop

Flutter API

ParameterDescription
variant: DotwearCardVariant.outlined.outlined (default), .flat
childThe content, with 6 dots of padding

Accessibility

  • The card does not group or rename its content; screen readers read the children as they are.
  • Web: use a real heading (<h2> etc.) for the card title. React Native: give the title Text accessibilityRole="header". Flutter: wrap it in Semantics(header: true).