Skip to main content

Example Usage

#An Example Image: 
from zero_true import Image


example = Image(id="Sample", alt="Oopsie!", height=100, src="https://storage.googleapis.com/pod_public/1300/150707.jpg")

Example Output

Overview

pydantic model zero_true.Image
Image component for displaying web hosted or local images. Supports .png, .jpg, and .jpeg file types

JSON Schema

{
   "title": "Image",
   "description": "Image component for displaying web hosted or local images. Supports .png, .jpg, and .jpeg file types",
   "type": "object",
   "properties": {
      "id": {
         "description": "Unique id for a component",
         "title": "Id",
         "type": "string"
      },
      "variable_name": {
         "default": "",
         "description": "Optional variable name associated with a component",
         "title": "Variable Name",
         "type": "string"
      },
      "component": {
         "default": "v-img",
         "description": "Vue component name",
         "title": "Component",
         "type": "string"
      },
      "src": {
         "description": "Source URL or Path of the image",
         "title": "Src",
         "type": "string"
      },
      "alt": {
         "default": "",
         "description": "Alternative text for the image",
         "title": "Alt",
         "type": "string"
      },
      "width": {
         "default": 100,
         "description": "Width of the image",
         "title": "Width",
         "type": "integer"
      },
      "height": {
         "default": 100,
         "description": "Height of the image",
         "title": "Height",
         "type": "integer"
      }
   },
   "required": [
      "id",
      "src"
   ]
}
Bellow are the various attributes you can assign to the component. Utlizing them can allow for modifications to the pre-created object.
zero_true.Image
Zero True Component