Use the rounded, circle and thumbnail props to customise the image.
<Grid> <Row> <Col xs={6} md={4}> <Image src="/thumbnail.png" rounded /> </Col> <Col xs={6} md={4}> <Image src="/thumbnail.png" circle /> </Col> <Col xs={6} md={4}> <Image src="/thumbnail.png" thumbnail /> </Col> </Row> </Grid>;
Use the responsive to scale image nicely to the parent element.
<Image src="/thumbnail.png" responsive />;
| Name | Type | Default | Description |
|---|---|---|---|
| responsive | boolean | false | Sets image as responsive image |
| rounded | boolean | false | Sets image shape as rounded |
| circle | boolean | false | Sets image shape as circle |
| thumbnail | boolean | false | Sets image shape as thumbnail |
| bsClass | string | 'img' | Base CSS class and prefix for the component. Generally one should only change |
Thumbnails are designed to showcase linked images with minimal required markup. You can extend the grid component with thumbnails.
Creates an anchor wrapping an image.
<Grid> <Row> <Col xs={6} md={3}> <Thumbnail href="#" alt="171x180" src="/thumbnail.png" /> </Col> <Col xs={6} md={3}> <Thumbnail href="#" alt="171x180" src="/thumbnail.png" /> </Col> <Col xs={6} md={3}> <Thumbnail href="#" alt="171x180" src="/thumbnail.png" /> </Col> </Row> </Grid>;
Creates a divider wrapping an image and other children elements.
Description
Description
Description
<Grid> <Row> <Col xs={6} md={4}> <Thumbnail src="/thumbnaildiv.png" alt="242x200"> <h3>Thumbnail label</h3> <p>Description</p> <p> <Button bsStyle="primary">Button</Button> <Button bsStyle="default">Button</Button> </p> </Thumbnail> </Col> <Col xs={6} md={4}> <Thumbnail src="/thumbnaildiv.png" alt="242x200"> <h3>Thumbnail label</h3> <p>Description</p> <p> <Button bsStyle="primary">Button</Button> <Button bsStyle="default">Button</Button> </p> </Thumbnail> </Col> <Col xs={6} md={4}> <Thumbnail src="/thumbnaildiv.png" alt="242x200"> <h3>Thumbnail label</h3> <p>Description</p> <p> <Button bsStyle="primary">Button</Button> <Button bsStyle="default">Button</Button> </p> </Thumbnail> </Col> </Row> </Grid>;
| Name | Type | Default | Description |
|---|---|---|---|
| src | string | src property that is passed down to the image inside this component | |
| alt | string | alt property that is passed down to the image inside this component | |
| href | string | href property that is passed down to the image inside this component | |
| onError | function | onError callback that is passed down to the image inside this component | |
| onLoad | function | onLoad callback that is passed down to the image inside this component | |
| bsClass | string | 'thumbnail' | Base CSS class and prefix for the component. Generally one should only change |