Frameworks
Vanilla / Web Component
Framework-agnostic Web Component — works in Angular, Svelte, Astro, or plain HTML.
Installation
Install the widget package using your preferred package manager:
pnpm add @resume-mapper/widgetUsage
Import from @resume-mapper/widget/vanilla once (e.g. in your bundle entry). This registers the <resume-mapper> custom element globally. Parsed data bubbles up as a CustomEvent named rm-parsed.
index.html
<!-- 1. Import once (e.g. in your bundle entry) -->
<script type="module">
import '@resume-mapper/widget/vanilla'
</script>
<!-- 2. Drop the element anywhere in your HTML -->
<resume-mapper
api-key="rm_your_api_key"
locale="en"
theme="auto"
></resume-mapper>
<script>
document.querySelector('resume-mapper')
.addEventListener('rm-parsed', (e) => {
console.log(e.detail.rawData.personalInfo)
})
</script>Attributes
| Attribute | Description |
|---|---|
| api-key * | Your Resume Mapper API key. |
| locale | UI language — en or pl. Defaults to en. |
| theme | light, dark, or auto. |
Events
| Event | event.detail |
|---|---|
| rm-parsed | Full ParseResult object |
| rm-error | Error message string |
| rm-upload | File object being uploaded |