Live CortexUI Surface

This block renders live CortexUI contract metadata in the docs DOM so AI View can inspect real machine-readable elements instead of only code examples.

AI View can now inspect a live status region, form fields, actions, and table entities on every docs page.
AI-addressable docs entities
ItemState
Search docsReady
Inspect metadataVisible in AI View

InputBase

A raw accessible input with no visual styling.

Purpose

InputBase handles the behavioral contract of an input:

  • Value binding and change events
  • Disabled state
  • Error state (via aria-invalid)
  • ARIA attributes

Usage

import { InputBase } from '@cortexui/primitives';

// Building a custom AI-native input
function PhoneInput({ value, onChange, error }) {
  return (
    <InputBase
      type="tel"
      value={value}
      onChange={onChange}
      aria-invalid={!!error}
      data-ai-role="field"
      data-ai-id="phone-field"
      data-ai-field-type="text"
      data-ai-required="true"
      className="border rounded px-3 py-2"
    />
  );
}

Props

PropTypeDefaultDescription
typestring'text'Input type
valuestringControlled value
onChange(e) => voidChange handler
disabledbooleanfalseDisable input
errorbooleanfalseSets aria-invalid
...restanyAny HTML input attribute