A declarative, extensible JSON-based schema to define screen-by-screen UI layouts directly from OpenAPI specs โ tightly coupled with TailwindCSS for seamless, styled UI generation on web and native platforms.
Caution
UiDSL is currently in pre-alpha. We are actively developing the specification and tools to make it mature enough for real-world prototyping. At this stage, UiDSL is not ready for full-scale production apps. Expect breaking changes, incomplete features, and evolving APIs as we work toward a stable release.
We welcome feedback and early experimentation, but please do not use UiDSL for critical production projects yet.
UiDSL is a specification format (like OpenAPI, but for UI) that enables developers to:
- Describe UI screens using structured JSON
- Map API data (from OpenAPI specs) directly to forms, tables, and views
- Generate React (web or native) components automatically using TailwindCSS
- Handle state, navigation, and events declaratively
This lets teams build interfaces that are consistent, maintainable, and tightly aligned with the backend.
UiDSL is not just a verbose version of HTML โ it is a platform-agnostic UI abstraction layer designed for:
- Cross-platform generation (React, React Native, Flutter, etc.)
- Declarative bindings to data, state, and events
- Reusable components and schema-driven definitions
- Generator-based output using tailored primitives like
container
,text
,input
, etc.
Platform | Output |
---|---|
Web (React) | <div> |
React Native | <View> |
Flutter | Container() |
This makes it ideal for design systems, prototyping tools, or AI agents that need to define UI once and target multiple runtimes.
UiDSL includes a small set of core primitives that are:
- Universally supported across platforms (e.g., web, native, mobile)
- Atomic in nature (cannot be decomposed further within the schema)
- Interpretable directly by all generators
Examples include: text
, input
, button
, switch
, etc.
More complex or composed elements (like card
, form
, modal
, tabs
) should be defined as custom components instead.
๐ฌ Want to propose a new primitive? Open a discussion and share your use case. We're open to feedback!
Primitive | Web (React) | React Native |
---|---|---|
container |
<div> |
<View> |
text |
<span> |
<Text> |
image |
<img> |
<Image> |
input |
<input> |
<TextInput> |
button |
<button> |
<TouchableOpacity> or <Button> |
label |
<label> |
<Text> |
icon |
<svg> / <i> |
icon component from lib |
checkbox |
<input type="checkbox"> |
<CheckBox> (or custom) |
radio |
<input type="radio"> |
<RadioButton> (or custom) |
select |
<select> |
<Picker> (or custom) |
switch |
Styled checkbox or custom switch | <Switch> |
๐ฌ Want to propose a new primitive? Open a discussion and share your use case. We're open to feedback!
Feature | HTML | UiDSL |
---|---|---|
Platform-agnostic | โ | โ |
Dynamic data binding | โ | โ |
Declarative events | โ | โ |
Component reuse (ref ) |
โ | โ |
Generator extensibility | โ | โ |
- ๐ง Screen-by-screen UI descriptions
- ๐ Bind UI to OpenAPI operations
- ๐จ First-class TailwindCSS support
- โ๏ธ Convert spec to JSX (React 19+)
- ๐ฑ Compatible with Web & React Native + NativeWind
- ๐ง Declarative events, navigation, and API calls
- ๐ Extensible for future template support (ShadCN, Gluestack UI, etc.)
.
โโโ uidsl.tailwind.schema.json # JSON Schema definition (TailwindCSS only)
โโโ examples/ # Example UI specs (login, dashboard, etc.)
โโโ docs/ # Detailed documentation (WIP)
โโโ generators/ # Code generators (JSX/Tailwind, CLI, etc.)
โโโ README.md # You are here
- Install a validator
npm install -g ajv-cli
- Validate your spec
ajv validate -s uidsl.tailwind.schema.json -d your-ui-spec.json
- Generate JSX (WIP)
node generators/jsx-from-uidsl.js your-ui-spec.json
We're planning to release optional UiDSL component templates for popular UI libraries, so you donโt have to define low-level component structures manually:
- โ
tailwind-default
โ default atomic components - ๐
shadcn-template
โ uses ShadCN UI primitives - ๐
gluestack-template
โ for React Native apps - ๐
chakra-template
โ Chakra UI-based scaffolds
Templates will include reusable component definitions that plug into components
section of your spec.
Checkout examples
directory.
Have ideas? Found a limitation? Want to contribute a generator or template?
โ Open an issue or start a discussion!
MIT
- CLI generator (React JSX output)
- Figma-to-UiDSL plugin
- Drag-and-drop UI builder
- OpenAPI โ UiDSL auto-mapper
Build UI as predictably as you build APIs. Welcome to UiDSL.