Skip to Content

Textarea

A brandless textarea. Accepts all native <textarea> attributes. All visual styling is driven by CSS custom properties.

Usage

import { Textarea } from '@froglet/ui' <Textarea placeholder="Enter your message here..." /> // Themed <Textarea className="textarea--brand" placeholder="Your message..." />

Props

PropTypeDescription
classNamestringAdditional CSS classes. Use to apply a token block.
refReact.Ref<HTMLTextAreaElement>Forwarded to the underlying <textarea>.
...propsTextareaHTMLAttributes<HTMLTextAreaElement>All standard textarea attributes.

CSS Custom Properties

TokenDefaultDescription
--textarea-min-height120pxMinimum height.
--textarea-padding0.5rem 0.75remInternal padding.
--textarea-border-width1pxBorder width.
--textarea-border-stylesolidBorder style.
--textarea-border-colorBorder color.
--textarea-border-radius0Border radius.
--textarea-font-size1remFont size.
--textarea-line-height1.5Line height.
--textarea-text-colorText color.
--textarea-background-colorBackground color.
--textarea-border-color-hoverBorder color on hover.
--textarea-background-color-hoverBackground on hover.
--textarea-border-color-focusBorder color when focused.
--textarea-outline-width-focus2pxFocus ring width.
--textarea-outline-color-focuscurrentColorFocus ring color.
--textarea-outline-offset-focus2pxFocus ring offset.
--textarea-border-color-disabledBorder color when disabled.
--textarea-text-color-disabledText color when disabled.
--textarea-background-color-disabledBackground when disabled.

Accessibility

  • Renders as a semantic <textarea> with full keyboard support.
  • Always associate a visible label using a <label> element or aria-label.
Last updated on