# uhtml-intents **Repository Path**: mirrors_WebReflection/uhtml-intents ## Basic Information - **Project Name**: uhtml-intents - **Description**: An utility to bring hyperHTML into µhtml - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-02-18 - **Last Updated**: 2025-12-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # µhtml-intents [](https://travis-ci.com/WebReflection/uhtml-intents) [](https://coveralls.io/github/WebReflection/uhtml-intents?branch=main) [](https://webreflection.github.io/csp/#-csp-strict) **Social Media Photo by [Markus Winkler](https://unsplash.com/@markuswinkler) on [Unsplash](https://unsplash.com/)** An utility to bring [hyperHTML intents](https://github.com/WebReflection/hyperHTML#readme) into [µhtml](https://github.com/WebReflection/uhtml#readme). **[Live Demo](https://codepen.io/WebReflection/pen/OJbgpMx?editors=0010)** ```js import {render, html} from 'uhtml'; import {define, intent} from 'uhtml-intents'; // a basic i18n example: key => {lang1, langX} const i18n = { greetings: { it: 'Ciao!', en: 'Hello!' } }; // the user chosen language let lang = 'it'; // define a basic i18n intent via a key name so that // when intent({i18n: 'greetings'}) is used, the function // will receive 'greetings' as argument: define(key, fn) define('i18n', key => { // so that the right translation can be offered return i18n[key][lang]; }); render(document.body, html`