About
An Astryx chat-composer shell arranging input, drawer, header, footer, send actions, status, and keyboard focus behavior.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Chat Composer to your project and fits it to your theme.
Code
How Astryx Chat Composer is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
'use client';
import {ChatComposer} from '@/components/ui/astryx-chat-composer';
import {Stack} from '@astryxdesign/core/Layout';
import {Text} from '@astryxdesign/core/Text';
function ChatComposerValidation() {
return (
<Stack direction="vertical" gap={4} width={450} maxWidth="100%">
<Stack direction="vertical" gap={1}>
<Text type="supporting" color="secondary">
Error message (with top position)
</Text>
<ChatComposer
onSubmit={value => {
console.log('Sent:', value);
}}
statusPosition="top"
status={{
type: 'error',
message: 'Failed to send message. Please try again.',
}}
/>
</Stack>
<Stack direction="vertical" gap={1}>
<Text type="supporting" color="secondary">
Warning message (with bottom position)
</Text>
<ChatComposer
onSubmit={value => {
console.log('Sent:', value);
}}
status={{
type: 'warning',
message: 'Context window is 90% full.',
}}
/>
</Stack>
</Stack>
);
}
export default function ChatComposerValidationDemo() {
return (
<div
data-astryx-theme="neutral"
data-theme="light"
style={{colorScheme: 'light', display: 'contents'}}>
<ChatComposerValidation />
</div>
);
}






