Introduction
solhtmx is a Solana-native extension to htmx that simplifies blockchain interactions using HTML attributes. It lets you:
- Connect wallets
- Sign transactions
- Interact with Solana
All using declarative HTML, without complex JavaScript.
Problem
Building blockchain apps typically involves:
- Complex wallet SDKs
- Managing connection state
- Handling transaction signing
- Coordinating UI updates
This means lots of JavaScript and careful orchestration of async operations.
Solution
solhtmx extends htmx with Solana-specific attributes:
sol-connect- Connect walletsol-sign- Sign transactionssol-wallet-address- Show wallet addresssol-trigger- React to blockchain events
Connecting a Wallet
<button sol-connect="true"
hx-get="/api/wallet-status"
hx-target="#wallet-info">
Connect Wallet
</button>
Clicking the button:

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.