Skip to content

Aztec Code

Pro

A square code for a train ticket or an event pass on a phone. A gate reads it from a dim screen, and it needs no white margin.

  • React 19
  • Tailwind CSS 4

Added Nov 11, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Aztec Code needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
14
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

Pass the ticket data.

ticket-code.tsx

AztecCode

<div>
PropTypeDefaultDescription
aria-labelstring—Defines a string value that labels the current element. The accessible name. Default the kind ("Data Matrix code"), or "<kind>: <value>" for a link.
valueRequiredstring—The data etiket encodes. The data of the ticket. Default size 160px.
pixelSizenumber—The outer width in px, quiet zone included. The height follows the symbol.
fitboolean—Fill the width of the parent, in whole px a module when that loses one module or less (the QR Code rule), else the exact width. Default false. Wide codes (postal, PDF417) on a phone.
plateboolean—The light plate under the code. Default true.
status"empty""error""loading""ready"—The load state. Default ready. loading: the skeleton while the value is not known yet. empty: the empty box. error shows as ready: the error box is for a value the code cannot hold.
labelsPartial<CodeSymbolLabels>—The texts of the empty and error states.
onError—Runs once for each new error (too much data, a character the kind cannot hold), after commit. It does not run again for the same error, and typed values are deferred: a field that shows the error should derive it from the value with the kind's encoder (cached, so free), not clear it on each change.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it for the ticket data of a train, a bus, or an event.
  • Use pixelSize for the outer width; the code is never wider.
  • Use plate={false} when the code sits on your own white paper.

It is an image named "Aztec code" by default, or "Aztec code: <link>" for a link. Pass aria-label to say whose ticket it is.

Show the route, the seat, and the name as text next to the code.

  1. AddedAztec Code.
Open the release