First of all, thank you for creating this wonderful OSS!
I am currently just starting to use jollyui.
Currently I am looking for a way to write a form similar to shadcn with good code.
Handling Zod validation and server actions with forms using jollyui and react-aria was easier than creating forms in shadcn.
However, I am struggling in some areas to build forms shadcn style.
For example, shadcn will have a destructive color for the label when there is a validation error.
![Image from Gyazo](https://camo.githubusercontent.com/f34ec93a76e3e1152e106f9d740a2ca281d179b2861e836adce707205ee7070b/68747470733a2f2f692e6779617a6f2e636f6d2f30626661656333393732356331663162623030306638666538323965623331642e706e67)
This is the code for the server actions form built with jollyui + react-aria.
'use client'
import { FieldError, Form, Text, TextField } from 'react-aria-components'
import { useFormState, useFormStatus } from 'react-dom'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { createAction } from './actions'
export function CreateLinkForm() {
const status = useFormStatus()
let [{ errors }, formAction] = useFormState(createAction, {
errors: {},
})
return (
<Form action={formAction} validationErrors={errors}>
<TextField isRequired className='flex flex-col gap-y-2 pb-5'>
<Label>Username</Label>
<Input placeholder='shadcn' />
<Text slot='description' className='text-sm text-muted-foreground'>
This is your public display name.
</Text>
<FieldError className='text-sm font-medium text-destructive' />
</TextField>
<Button type='submit' isDisabled={status.pending}>
{status.pending ? 'Submitting...' : 'Submit'}
</Button>
</Form>
)
}
I was able to apply the color to the error message by writing the className directly in the FieldError component.
However, I have been trying to figure out how to apply color to labels, but I am currently unable to come up with a good idea.
![Image from Gyazo](https://camo.githubusercontent.com/aa7611c79cb2166ae4a4fbf5cbcac08d844ea01206d1273526065f2eb9f129bc/68747470733a2f2f692e6779617a6f2e636f6d2f36383965363834333362373861613932646534396334353931326165653631342e706e67)
Has anyone built a form similar to shadcn's style with jollyui+react-aria?
Also, since it is not very pretty to write the style directly, I thought many people would be pleased if there was a component to build the form.