website logo
👥 Community🎯 Samples on GitHub🚦System Status
💡 Guides
🚀 Examples
🍕 Developer Reference
⚡️ Changelog
🎥 Video Library
Navigate through spaces
⌘K
Examples Overview
Setting up your solution
Jig Types
Components
Datasource
Actions
Preview
Widgets
Expressions
Aggregation
Boolean
Comparison Operators
Date & Time
Path Operators
Functional Programming
Jigx Variables
Predicate Queries
String
Docs powered by
Archbee
Components
form

avatar-field

6min

This component is used to upload an image as an avatar. You can use images from your device or use your camera to take a picture.

Avatar Field Preview
Avatar Field Preview


avatar-field can only be used in a jig.default inside of a form component and is only compatible with dynamic or SQL data, so that the image has somewhere to be saved.

Configuration options

Some properties are common to all components, see Common component properties for a list and their configuration options.



The core structure includes: instanceId and label

Other options:

  • icon - There is a list of icons available, but you can customize the design with your own icon.
  • color - There is a list of colors available. The color is used in combination with the condition when.
  • maximumFileSize =6 * 1024 * 1024 by default. Set the value to none if no size evaluations must be performed. File size format is in bytes.

Examples and code snippets 

Avatar field example

Avatar
Avatar


This component uploads pictures for avatars. After clicking on the plus next to the avatar, a menu will appear where we can choose whether to upload an existing image from our device or use the camera to take a new image. After loading and cropping the image, we press the "Upload picture" button at the bottom, which calls the action to save the image.

Examples:

See the full example using dynamic data in GitHub.

avatar (dynamic)
|
children:
  - type: component.form
    options:
      children:
        - type: component.avatar-field
          instanceId: avatar-field
          options:
            label: Upload avatar
            color:
              - when: true
                color: color2
            style:
              flex: 1
            imageCropping:
              width: 120
              height: 120
            isHidden: false
            isIgnored: false


See also

  • Developer reference
  • Related examples (Github)



Updated 13 Jul 2023
Did this page help you?
PREVIOUS
form
NEXT
media-field
Docs powered by
Archbee
TABLE OF CONTENTS
Configuration options
Examples and code snippets
Avatar field example
See also
Docs powered by
Archbee
Copyright © 2023 Jigx, Inc. All rights reserved. Terms of Service