mirror of
https://github.com/hanzoai/gui.git
synced 2026-10-25 02:31:41 +00:00
Both old names are owned by a different npm account (artemis-prime), so publishing them returns 403 — which is how this surfaced: the 8.0.0 run shipped @hanzogui/logo and @hanzogui/demos depending on [email protected], a version that cannot be published and therefore does not exist. Those two were uninstallable. @hanzo/gui and @hanzogui/* are ours, so the framework now carries the name it is imported by everywhere downstream, and the loader moves under the scope we control. The rewrite is limited to package references. `DEBUG?.startsWith('hanzogui')` is a log-namespace filter and join(dir, 'hanzogui') is a path — rewriting either would change behaviour, so both are untouched. Co-authored-by: Hanzo Dev <[email protected]>
52 lines
1.1 KiB
Plaintext
52 lines
1.1 KiB
Plaintext
---
|
|
title: Input & Textarea
|
|
name: inputs
|
|
description: Flexible form fields in styled and unstyled forms.
|
|
component: Input
|
|
demoName: Inputs
|
|
---
|
|
|
|
<HeroContainer demoMultiple>
|
|
<InputsDemo />
|
|
</HeroContainer>
|
|
|
|
```tsx hero template=Inputs
|
|
|
|
```
|
|
|
|
Using the same base component TextInput, from [React Native](https://reactnative.dev/docs/textinput) or [React Native Web](https://necolas.github.io/react-native-web/docs/text-input/), Gui simply wraps these components to allow the full set of style props, as well as scaling all the styles up or down using the `size` property, much like Button.
|
|
|
|
## Installation
|
|
|
|
Input is already installed in `hanzogui`, or you can install it independently:
|
|
|
|
```bash
|
|
npm install @hanzogui/input
|
|
```
|
|
|
|
## Input
|
|
|
|
A one-line input field:
|
|
|
|
```tsx
|
|
import { Input } from '@hanzo/gui'
|
|
|
|
export const App = () => (
|
|
// Accepts size and style properties directly
|
|
<Input size="$4" borderWidth={2} />
|
|
)
|
|
```
|
|
|
|
## TextArea
|
|
|
|
For multi-line inputs:
|
|
|
|
```tsx
|
|
import { TextArea } from '@hanzo/gui'
|
|
|
|
export const App = () => (
|
|
// Accepts size and style properties directly
|
|
<TextArea size="$4" borderWidth={2} />
|
|
)
|
|
```
|