Card
Cards provide a versatile container for any sort of content
Examples
Cool mountainsJust look at them
This is a lovely image of some mountain scenery.
import React from 'react';
import ReactDOM from 'react-dom';
import { Card, CardSection, Title, Text, Paragraph, Button } from 'furl-components';
ReactDOM.render(
<Card width={320}>
<CardSection>
<Title level={5}>Cool mountains<Text textStyle='small'>Just look at them</Text></Title>
</CardSection>
<CardSection media='mountain-scenery.jpg' height={200} />
<CardSection>
<Paragraph>This is a lovely image of some mountain scenery.</Paragraph>
</CardSection>
<Button>I want to visit the mountains</Button>
</Card>,
document.getElementById('root')
);API
| Property | Description | Type | Default | ||
|---|---|---|---|---|---|
| width | card width | int/string | 'auto' | ||
| Property | Description | Type | Default | ||
|---|---|---|---|---|---|
| media | card section media url | string | |||
| height | card section height | int/string | 'auto' | ||
Notes
- A
Cardonly accepts children of theCardSectioncomponent type. Children that are not of theCardSectioncomponent type will be automatically cast to appropriate components. - The
CardSection’sheightaccepts any valid CSS value, including CSS variables, and will only be applied ifmediais specified. - If a
CardSectionhas amediaprop specified, it should not have any children. widthandheightaccept any valid CSS value, including CSS variables.
