@econnect/webcomponents-library
Documentation
Styleguide
Documentation
Styleguide
  • Getting Started

    • Installation
    • Patch Notes
    • Styleguide
  • Styling

    • e-connect colors
  • UI Components

    • Form

      • Search Field
      • Form Field
      • Forms
    • Filter

      • Filter
      • Search Filter
    • Grid

      • Grid
      • Grid Row
    • Inputs

      • File Input
      • Input Checkbox
      • Input Dropdown
      • Input Date
      • Input Date Time
      • Input Date Time Local
      • Input File
      • Input Label
      • Input Multi Select
      • Input Number
      • Input Radio
      • Input Range
      • Input Select
      • Input Switch
      • Input Slider
      • Input Text
      • Input TextArea
      • Input Time
      • Input Time Range
    • Controls

      • Booleans
      • Button
      • Checkboxes
      • Date Displays
      • Dropdown Lists
      • Text Displays
    • Headers

      • e-header
    • Cards

      • e-card
    • Images

      • Icon
      • Images
      • Flag Image
      • Hamburger
    • Iframe
    • Pager
    • Settings
    • Document Validation
    • Navigation

      • Navigation
      • Navigation Menu
      • Navigation Footer
      • Navigation Button
      • Navigation Button Item
      • Navigation Search Item

Images v1.0

The <e-image> component is a component that can be used for displaying images.

Usage

An e-image has 3 attributes that can be provided, src, alt, and rounded

<e-image
    src=''
    alt=''
    :rounded=''
/>

Attributes

src | Type: String | required
alt | Type: String | required
rounded | Type: Boolean | Default: false

Examples

Below a few interactive examples of e-images can be found.

Default Image
<e-image
    src='https://i.imgur.com/GXWcpBc.png'
    alt='AzureAD Banner'
/>
AzureAD Banner
Rounded Image
<e-image
    src='https://i.imgur.com/GXWcpBc.png'
    alt='AzureAD Banner'
    :rounded='true'
/>
AzureAD Banner

Source Code

e-image.vue
<script setup lang="ts">
export type Props = {
  src: string;
  alt: string;
  rounded?: boolean;
};
withDefaults(defineProps<Props>(), {
  rounded: false
});
</script>

<template>
  <div class="e-image">
    <img
      class="image"
      :class="{
        rounded: rounded
      }"
      :src="src"
      :alt="alt"
    />
  </div>
</template>

<style scoped lang="scss">
.e-image {
  display: flex;
  flex-direction: column;
  align-content: center;
  justify-content: center;
  padding: 15px 0;

  .image {
    width: 100%;
  }

  .rounded {
    border-radius: 15px;
  }
}
</style>
Last Updated:: 10/10/24, 2:56 PM
Contributors: Antony Elfferich, Marcel Lommers
Prev
Icon
Next
Flag Image