```ts import Card from "~/components/ui/Card.vue" ``` # Card Funkwhale cards are used to contain textual information, links, and interactive buttons. You can use these to create visually pleasing links to content or to present information. ::: details Props ```ts { title: string category?: true | "h1" | "h2" | "h3" | "h4" | "h5" tags?: string[] image?: string | { src: string, style?: "withPadding" } icon?: string } & Partial & (PastelProps | ColorProps | DefaultProps) & RaisedProps & VariantProps & WidthProps ``` :::
```vue-html Access your personal music collection from anywhere. Funkwhale gives you access to publication and sharing tools you can use to promote that your content across the web. ```
Access your personal music collection from anywhere. Funkwhale gives you access to publication and sharing tools that you can use to promote your content across the web.
## Card as a Link Add a `:to` prop, either containing an external link (`"https://..."`) or a Vue Router destination: ```ts ``` ## Card as a Category header Category cards are basic cards that contain only a title. To create a category card, pass a `category` prop. ```vue-html{1,5} ``` ## Add an Image Pass an image source to the `image` prop or set both `image.src` and `image.style` by passing an object.
```vue-html{3,8-9} /> ```
## Add an Icon
```vue-html{4,10} Visit the Docs and learn more about developing Funkwhale ```
Visit the Docs and learn more about developing Funkwhale
You can combine this prop with any other prop configuration. If you combine it with an image, keep an eye on the contrast ratio between the icon color and the image. ## Add an Alert ```vue-html{2-4} ```
## Add a topright action ```vue-html ``` ## Add a Footer Items in this region are secondary and will be displayed smaller than the main content. ```vue-html{3-9} ```
## Add an Action Large Buttons or links at the bottom edge of the card serve as Call-to-Actions (CTA). ```vue-html{3-6} The easiest way to get started with Funkwhale is to register an account on a public pod. ```
The easiest way to get started with Funkwhale is to register an account on a public pod.
If there are multiple actions, they will be presented in a row: ```vue-html{4,7} All items have been assimilated. Ready to go! ```
All items have been assimilated. Ready to go!
## Add Tags You can include tags on a card by adding a list of `tags`. These are rendered as [pills](./pill.md). ```vue-html{3} Access your personal music collection from anywhere. Funkwhale gives you access to publication and sharing tools that you can use to promote your content across the web. ```
Access your personal music collection from anywhere. Funkwhale gives you access to publication and sharing tools that you can use to promote your content across the web.
### Sizes `large` (304px), `medium` (208px), `auto`, `small`