
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@trully/trully-image-reader-react
Advanced tools
Image reader with dynamic element recognition support for Trully react components
Componente pensado para ser integrado en procesos de reconocimiento de imágenes
| Key | Description |
|---|---|
isDev | Boolean. Allows to handle dev and prod url |
apiKey | String. Allows entering the client apiKey for each use case |
endpoint | String. Allows to handle the endpoint for the different images analysis |
user_id | String. Allows matching the endpoint calls with the user. This is done to easily access the process data when need it |
tag | UUID String. One process could have several analysis. The tag is used to link every analysis to the same process. |
| If it isn't receive by prop. One will be created. | |
Shape | ReactElement. Allows to control the shape for the type of image that the model would be analyzing |
forcePortrait | Boolean. Allows to declare if the user will be able to use their mobile device on landscape position |
handleData | Should be a callback function receiving an ImageResponse parameter. This parameter will hold the process result. |
handleError | Should be a callback function receiving an ErrorResponse parameter. This parameter will hold an error object. |
forceFrontCameraForMobile | Boolean (optional). Allows to declare which camera will be open for mobile devices. Default back |
isFront | Boolean (optional). If the model needs to knows which side of image will receive. Default back |
timeout | Number (optional). Allows to declare how many seconds will the user have to take the photo. Default 30 |
styles | Styles object (optional). Allows the user to personalize the component styles |
import "../../node_modules/@trully/trully-image-reader-react/dist/styles/styles.css";
import { CanvasComponent } from "./CanvasComponent";
import { TrueDeepfakeDetection } from "@trully/true-deepfake-detection";
export const LectorImagen = () => {
return (
<TrullyImageReader
configuration={{
endpoint: "ENDPOINT",
Shape: <CanvasComponent />,
isDev: true,
apiKey: "API_KEY",
user_id: "USER_ID",
isFront: true,
handleData(handleData) {
console.log(handleData);
},
handleError(error) {
console.log(error);
},
forcePortrait: true,
}}
/>
);
};
| Key | Description |
|---|---|
images | Images object. Allows changing the default images |
colors | Colors objet. Allows changing the default colors |
textsStyles | TextsStyles object. Allows the default font and color font |
| Key | Default value |
|---|---|
rotate | @trully/trully-helpers-react - DEFAULT_IMAGES.ROTATE |
| Key | Default value |
|---|---|
icons | @trully/trully-helpers-react - COLORS.DODGER_BLUE |
primary | @trully/trully-helpers-react - COLORS.DODGER_BLUE |
background | @trully/trully-helpers-react - COLORS.WHITE |
| Key | Default value |
|---|---|
fontFamily | @trully/trully-helpers-react - DEFAULT_FONT |
individualFamily? | @trully/trully-helpers-react - IndividualFamily type |
primaryTextColor | @trully/trully-helpers-react - COLORS.SHARK |
The object returned through the handleData callback. It get its values from a combination of the back-end response and some values obtained during the front-end execution.
| Key | Description |
|---|---|
tag | String uuid. The one from props |
session_id | String uuid. backData?.identifier?.session_id |
images | Images object. |
hasBack | backData?.instructions?.has_back |
docType | backData?.attributes?.doc_type |
retake | backData?.instructions?.retake |
retakeReasons? | backData?.retake_reasons |
| Key | Description |
|---|---|
image | String base64. Cropped analyzed image |
image_full | String base64. Full analyzed image |
This values are all booleans. Here is a list of the available keys
| Key |
|---|
cameraNotAllowed |
constraintsError |
unknownCameraOpeningError |
timeout |
processingImageError |
The object returned through the handleError callback. It get its values from a combination of the back-end response and some values obtained during the front-end execution.
| Key | Description |
|---|---|
type | String. One of ERROR_TYPE enum. Used to identify if it is a front-end or a back-end error |
reasons | ERROR_REASONS object |
error | ProcessError object |
The ERROR_REASONS object is a constant use to hold every possible error reason. Every one of the keys declared in it are set to false. To use it, create a new copy of it and change the necessary key value to true. This will mean that the jey holding the true value is the error reason. Every error will result in the process shutting down
| Key | Description |
|---|---|
cameraNotAllowed | The user didn't allow for the camera to be used |
constraintsError | Webcam configuration didn't work |
unknownCameraOpeningError | Webcam couldn't be open |
googleImageCaptureError | ImageCapture error |
timeout | User didn't take the picture before the timeout declare in props |
processingImageError | Back-end model error. |
serverTimeout | Fetch to back took longer than 2 minutes |
| Key | Description |
|---|---|
process | String. One of PROCESS_STEP enum. Used to identify where the error occur |
message | String. One of ERROR_MESSAGE enum. |
user_id | The user_id passed through props. |
timestamp | UTC timezone. new Date().toUTCString(). |
error | Object. The error that triggered the handleError execution |
FAQs
Image reader with dynamic element recognition support for Trully react components
The npm package @trully/trully-image-reader-react receives a total of 2 weekly downloads. As such, @trully/trully-image-reader-react popularity was classified as not popular.
We found that @trully/trully-image-reader-react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.