# texsaur

> Create elements with JSX.

Latest version **1.0.7** (published 2026-04-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install texsaur
pnpm add texsaur
yarn add texsaur
bun add texsaur
```

## Health

**Score 60/100 (C)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2026-04-13 |
| First published | 2021-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | Connor Low |
| Maintainers | pancakeoverflow |

## Links

- npm: https://www.npmjs.com/package/texsaur
- Repository: https://github.com/ConnorJamesLow/texsaur
- Homepage: https://github.com/ConnorJamesLow/texsaur#readme
- Issues: https://github.com/ConnorJamesLow/texsaur/issues
- npm.io page: https://npm.io/package/texsaur

## Recent versions

- 1.0.7 (latest) — 2026-04-13
- 1.0.6 — 2026-02-07
- 1.0.5 — 2026-02-07
- 1.0.4 — 2025-07-04
- 1.0.3 — 2025-05-09
- 1.0.2 — 2024-05-25
- 1.0.1 — 2023-06-20
- 1.0.0 — 2023-06-15
- 0.8.0 — 2023-03-09
- 0.7.1 — 2023-03-05
- 0.7.0 — 2023-03-04
- 0.6.4 — 2023-02-24
- 0.6.3 — 2023-02-22
- 0.6.2 — 2023-02-22
- 0.6.1 — 2022-06-30
- … 14 more at https://npm.io/package/texsaur/versions

## README

# Texsaur
A simple jsx to DOM `Node` parser.  

## Overview
To create a DOM element in JavaScript, we *could* use `document.createElement`:

```ts
const div = document.createElement('div');
div.classList.add('example');
div.innerText = 'hello there';
div.addEventListener('click', () => console.log('clicked!'));
```

*Texsaur* lets you do this with jsx instead:

```tsx
import jsx from 'texsaur';

const div = (
  <div class="example" 
       onclick={() => console.log('clicked!')}>
    Hello there
  </div>
) as HTMLElement;
```

Functional components are supported too:

```tsx
const Example = ({ onClick }, children) => (
    <div class="example" onclick={onClick}>{children}</div>
);

const div = <Example onClick={() => console.log('clicked!')}>Hello there</Example>;
```

[Here's a playground](https://www.typescriptlang.org/play?target=2&module=1#code/PQKgsAUABCUAICsDOAPKyWRsSkCWAtgA4D2ATgC7qpQBmZJBUA5BQKYpICGArmcwG5cEWjwB2AYwp4SYqACU2E8gBMAFAG8o7FFQC+ALihadFI0gpk8YgOZQ9ASmNYorsmwp85AHiREuYgB8GqZ63sB+AYFCEHrCymIWUABGPBQUslAAvFBqLq7eqemZshIANngSANZZGmpOWYFQDCQUAHRcRERsYioAwgAWeGXq3orKZCraHBRZAER9FdVsUxQDbFAAQmkZYm1zUMCBDnqB+a4X28Vi5+FFu2cQDvGySS1UOXnQF94EXNaPC5A4z3WRxb4FYB-AGQZ4QSAqEgSHgEHrtZIkFQATw6XR6-SGIzU7wcAiAA).


## Documentation
Want help getting started? [Check out the GitHub repository](https://github.com/ConnorJamesLow/texsaur).

---
_Source: https://npm.io/package/texsaur · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
