furl
Getting startedDesignComponents
Design
Design GuidelinesTypography SystemLayout SystemColor palettesCustomization
Components
ComponentsAccordionAlertAnchorAudioAvatarBadgeBreadcrumbsButtonButtonGroupCalendarCardCollapseContextButtonDividerDropdownFooterFormGraphGridHyperlinkIconIframeImageInputItemLayoutListLoaderMediaObjectMenuModalNotificationPaginationPopoverProgressSearchStepsSwitchTableTabsTooltipTypographyVideo

Image

Images provide visual stimulation to users and help provide context for the content around them.

Examples

Photo by Cristina Gottardi on Unsplash
Photo by Cristina Gottardi on Unsplash
import React from 'react';
import ReactDOM from 'react-dom';
import { Image } from 'furl-components';

ReactDOM.render(
  <Image
    src="./goat-image.jpg"
    alt="A happy goat"
    withCaption
    height={400}
  />, 
  document.getElementById('root')
);

API

Image props
Property Description Type Default
src image source url string
alt image alternate text string 'An image'
withCaption render captioned figure boolean false
width image with int/string 'auto'
height image height int/string 'auto'

Notes

  • It is highly recommended you specify a descriptive value for alt to make your image accessible to screen-readers. This is why we already provide a default value instead of using an empty string or undefined.
  • If you provide withCaption, the component will render a <figure> and a <figcaption> accompanying the <img> element. The value of alt will be used for the <figcaption>.
  • width and height accept any valid CSS value, including CSS variables.

furl was designed and developed by Angelos Chalaris © 2019
Documentation generated using Gatsby, hosting by Netlify