Skip to content

Repository files navigation

Ybyra

Schema-driven forms for React, Vue, and Svelte. Define your fields once, get type-safe forms, tables, validation, events, and actions — all from a single source of truth.

import{text,Text,date,toggle,group,action,Position,Scope}from'@ybyra/core'constPersonSchema=schema.create('person',{groups: {basic: group(),address: group(),},fields: {name: text().width(100).required().column().group('basic'),email: text().kind(Text.Email).width(60).required().column().group('basic'),phone: text().kind(Text.Phone).width(40).group('basic'),birthDate: date().width(30).group('basic'),active: toggle().width(20).default(true).column().group('basic'),street: text().kind(Text.Street).width(60).group('address'),city: text().kind(Text.City).width(40).group('address'),},actions: {custom: action().icon(Icon.Send).warning().positions(Position.footer).scopes(Scope.add),},})

No labels in code. No boilerplate. Full TypeScript inference.

Documentation

Visit the full documentation for guides, API reference, and examples.

Packages

PackageDescription
@ybyra/coreSchema definition, field types, actions, groups, type system
@ybyra/reactuseDataForm / useDataTable hooks, renderer registry, validation
@ybyra/vueuseDataForm / useDataTable composables for Vue
@ybyra/svelteuseDataForm / useDataTable stores for Svelte
@ybyra/react-webReady-made field renderers for React web
@ybyra/react-nativeReady-made field renderers for React Native
@ybyra/vue-quasarReady-made field renderers for Vue + Quasar
@ybyra/sveltekitReady-made field renderers for SvelteKit
@ybyra/persistenceLocal and web persistence drivers

Installation

pnpm add @ybyra/core @ybyra/react

Development

pnpm install
pnpm build # build all packages
pnpm test# run all tests
pnpm docs:dev # documentation dev server

Publishing

This project uses changesets for versioning and publishing.

Creating a changeset

After making changes, run:

pnpm changeset

Follow the prompts to select which packages changed and the semver bump type (patch/minor/major).

Versioning and releasing

# Apply version bumps and generate changelogs
pnpm version-packages
# Build and publish to npm
pnpm release

Note: You must be logged in to npm (npm login) and be a member of the @ybyra organization.

License

MIT

About

Schema-driven form system for React and React Native

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages