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
Card
only accepts children of theCardSection
component type. Children that are not of theCardSection
component type will be automatically cast to appropriate components. - The
CardSection
’sheight
accepts any valid CSS value, including CSS variables, and will only be applied ifmedia
is specified. - If a
CardSection
has amedia
prop specified, it should not have any children. width
andheight
accept any valid CSS value, including CSS variables.