diff --git a/docs/content/components/image/image-fit-position.demo.tsx b/docs/content/components/image/image-fit-position.demo.tsx new file mode 100644 index 0000000000..3c4273d809 --- /dev/null +++ b/docs/content/components/image/image-fit-position.demo.tsx @@ -0,0 +1,12 @@ +import { Aspect, Image } from '@marigold/components'; + +export default () => ( + + event_image + +); diff --git a/docs/content/components/image/image.demo.tsx b/docs/content/components/image/image.demo.tsx new file mode 100644 index 0000000000..f6ce36b33b --- /dev/null +++ b/docs/content/components/image/image.demo.tsx @@ -0,0 +1,8 @@ +import { Image } from '@marigold/components'; + +export default () => ( + event_image +); diff --git a/docs/content/components/image/image.mdx b/docs/content/components/image/image.mdx new file mode 100644 index 0000000000..dac9736de0 --- /dev/null +++ b/docs/content/components/image/image.mdx @@ -0,0 +1,66 @@ +--- +title: Image +group: Content +caption: Component to render images +--- + +The `` is a content component that renders an image on the page. + +The `src` property is always required. It can be used with a link or with an image from the server's file system. + +To improve accessibility, `alt` information should be provided whenever possible. +The `alt` attribute holds a text description of the image and screen readers read this description out to their users so they know what the image means. The `alt` text is also displayed on the page if the image can't be loaded for some reason: for example, network errors, content blocking, or linkrot. + +For more information about accessibility please visit [w3.org](https://www.w3.org/WAI/tutorials/images/tips/) or [bitvtest.de](https://ergebnis.bitvtest.de/pruefschritt/bitv-20-web/9-1-1-1b-alternativtexte-fuer-grafiken-und-objekte) + +## Usage + +### Import + +```tsx +import { Image } from '@marigold/components'; +``` + +### Apperance + + + +### Props + + + +## Usage + +### Simple Image + +In this example you can see a `` Component. + + + +### Image with fit and position + +In this example, the `` gets the `` property and the `` property is set to bottom. You also need to wrap the `` in a `` component so that the fit and position properties can be used. + +