Skip to content

Latest commit

 

History

History
34 lines (26 loc) · 3.11 KB

react.md

File metadata and controls

34 lines (26 loc) · 3.11 KB

React API · 0.3.0

All packages are private. Components expose native props/ref unless listed otherwise. Import core and React CSS explicitly once.

Export Native element / purpose Added props
IvoryRoot div; theme and one engine lifecycle owner theme, config, tuning, opticalEffects, effects
IvoryScope div; inherited tuning without a new root tuning
useGlass explicit advanced integration root ref, engine options, enabled flag; returns refresh
useIvory read-only inherited theme/tuning context exposes refresh, theme, tuning and optical eligibility
GlassSurface div; clear-glass material tuning, opticalEffects
AcrylicSurface div; frosted/acrylic material same
Button button; explicit action `variant="primary
IconButton button Button props plus required aria-label
Icon svg optional title; decorative by default
Card div; core card recipe with padding defaults tuning, opticalEffects
Input native input inside a glass div; ref reaches input surfaceProps, tuning, opticalEffects
Select native select inside a glass div; ref reaches select same
TextField decorated public Input Input props plus label, hint, error, fieldProps
SelectField decorated public Select Select props plus the same decoration props
Message div; static notice `tone="warning
Alert Message with explicit announcement semantics same, `role="alert

Root config merges shared, selected light/dark values, then root tuning. Surface tuning wins over duplicate normal surface style keys. No implicit per-component engine exists. Ordinary native input style/className stay on the input; surfaceProps targets its wrapper and fieldProps its decorated layout.

Field error presence sets invalid state. Without a supplied error, explicit native aria-invalid is preserved. Host description IDs are merged and deduplicated; messages are not automatic live regions. No validator/rule API, form state, router or submission manager is exported.

Named entries such as /button, /input, /text-field, /glass-surface and /acrylic-surface expose the same implemented components and matching types. Source/internal paths are not public exports.

Identity exports: NonverseIdentityProvider, useIdentity, Avatar, UserPill, AccountChooser, ProfileMenu, and current user/client contracts. UserPill is absent when signed out. Profile menu visibility is controlled by open/onClose; account switching and sign-out go through the provided Nonverse client. The separate /motion entry exports UserIntro, shared defaults and timing/placement types.

General Motion exports: IvoryMotion, MotionGlassSurface, MotionAcrylicSurface, MotionButton, materialTransition. They use a Motion peer without adding it to static package import graphs.

See identity API and Motion API for the separate add-ons.