
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@openzeppelin/contracts-ui-builder-ui
Advanced tools
Shared React UI components for the OpenZeppelin Contracts UI Builder.
This package provides a comprehensive set of shared React UI components for the OpenZeppelin Contracts UI Builder ecosystem. It serves as the central library for all common UI elements, including basic primitives, form field components, and their associated utilities.
The primary goal of @openzeppelin/contracts-ui-builder-ui
is to ensure UI consistency, maintainability, and reusability across the various parts of the Contracts UI Builder, such as @openzeppelin/contracts-ui-builder
and @openzeppelin/contracts-ui-builder-renderer
and adapter packages.
All components are built with React, TypeScript, and styled with Tailwind CSS, following the shadcn/ui patterns and design principles established in the root configuration of the monorepo.
This package includes, but is not limited to:
Button
, LoadingButton
, Input
, Label
, Textarea
, Card
(and its parts), Dialog
(and its parts), Alert
(and its parts), Checkbox
, RadioGroup
, Select
(and its parts), Progress
, Tabs
, Tooltip
, etc.react-hook-form
and are typically rendered via DynamicFormField
in @openzeppelin/contracts-ui-builder-renderer
.
AddressField
AmountField
BaseField
(a foundational component for creating new field types)BooleanField
NumberField
RadioField
SelectField
SelectGroupedField
TextAreaField
TextField
buttonVariants
for class-variance-authority
.Components and utilities can be imported directly from this package:
import { Control, useForm } from 'react-hook-form';
import { Button, TextField, type TextFieldProps } from '@openzeppelin/contracts-ui-builder-ui';
interface MyFormData {
name: string;
}
function MyCustomForm() {
const { control } = useForm<MyFormData>();
return (
<form className="space-y-4">
<TextField
id="name"
name="name" // Make sure 'name' is a valid FieldPath<MyFormData>
label="Full Name"
control={control as Control<FieldValues>}
placeholder="Enter your full name"
/>
<Button type="submit">Submit</Button>
</form>
);
}
ui/
├── src/
│ ├── components/
│ │ ├── ui/ # Basic UI primitives
│ │ └── fields/ # Specialized form field components
│ ├── hooks/ # Shared UI hooks
│ ├── lib/ # Utility functions and configurations
│ ├── stories/ # Storybook stories for all components
│ └── index.ts # Main package exports
├── package.json # Package configuration
├── tsconfig.json # TypeScript configuration
├── tsup.config.ts # Build configuration
├── vitest.config.ts # Test configuration
└── README.md # This documentation
Components are styled using Tailwind CSS. The necessary Tailwind configuration (including theme, plugins) is expected to be present in the consuming application, typically by presetting from the monorepo's root tailwind.config.cjs
. The UI package itself does not bundle CSS but provides the class names and structure.
Component examples and variations can be explored via Storybook by running pnpm storybook
from the monorepo root and navigating to the components under the "UI" or similar section.
FAQs
Shared React UI components for the OpenZeppelin Contracts UI Builder.
The npm package @openzeppelin/contracts-ui-builder-ui receives a total of 6 weekly downloads. As such, @openzeppelin/contracts-ui-builder-ui popularity was classified as not popular.
We found that @openzeppelin/contracts-ui-builder-ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.