Svelte
<Card variant="flat" width="200px">
{#snippet children()}
<p>flat</p>
{/snippet}
</Card>
<Card variant="outlined" width="200px">
{#snippet children()}
<p>outlined</p>
{/snippet}
</Card>
<Card variant="ghost" width="200px">
{#snippet children()}
<p>ghost</p>
{/snippet}
</Card> API
| Prop | Type | Default |
|---|---|---|
| variant | "flat" | "outlined" | "ghost" | "flat" |
| elevation | "none" | "subtle" | "hard" | "hard" |
| width | string | undefined |
| rounded | boolean | false |
| href | string | undefined |
| leading | Snippet | — |
| children | Snippet | — |
| trailing | Snippet | — |
Prop variant
Type
"flat" | "outlined" | "ghost"Default
"flat"Prop elevation
Type
"none" | "subtle" | "hard"Default
"hard"Prop width
Type
stringDefault
undefinedProp rounded
Type
booleanDefault
falseProp href
Type
stringDefault
undefinedProp leading
Type
SnippetDefault
—Prop children
Type
SnippetDefault
—Prop trailing
Type
SnippetDefault
—