- Components
Input
A single-line text field with the system's border, focus ring and invalid state.
npx shadcn add @klarhimmel/inputWhen to use
Use for
Short free text: a name, an email, a search.
Not for
Long answers. Use Textarea.
Pairs with
Always inside a Field.
Preview
We only use it to reply.
input.tsx
import { Theme } from '@/components/klarhimmel/theme/style';
import { Input, Field } from '@/components/klarhimmel/ui/input';
export default function Example() {
return (
<Theme theme="brand">
<Field label="Email" hint="We reply within a day.">
{(p) => <Input type="email" {...p} />}
</Field>
</Theme>
);
}Install
Import
import { Input } from '@/components/klarhimmel/ui/input';- Lands in
- components/klarhimmel/ui/input.tsx, plus cn() and the theme item if they are missing. Import theme.css after Tailwind.
- Render in
- Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
...input | InputHTMLAttributes | - | Every native input attribute is passed through. |
className | string | - | Extra classes, merged after the component's own. |