rokle

Personality

20
40
70
15

Active brand: Meridian

Adjust sliders to see every component on the page respond in real time.

Field

Composable form field wrapper combining a label, input, and validation message.

Examples

Basic with Label

A simple form field with label and input.

Required

Field marked as required with an asterisk indicator.

With Error

Field with inline validation error message.

With Description

Field with helper description text below the input.

Installation

pnpm add @rokle/components @rokle/tokens

Installs with the default Rokle brand. Generate a custom brand on rokle.app to use your own colours and personality.

Usage

import { Field } from "@rokle/components";
import { Field } from "@rokle/components";

export function Example() {
  return <Field />;
}

API Reference

PropTypeDefaultDescription
labelstring-Field label text.
errorstring-Validation error message.
requiredbooleanfalseShow required indicator on label.
childrenReactNode-The input element.