185 Pro components and page blocks

Get Pro

Updated

Spill Textarea

Preview

Customize

Limit80
Fall, leave a gap
Gravity1.0
Warn at0.80
Count from20
Color
Warn colour
Radius16px

Installation

npx shadcn@latest add https://uibrik.com/r/spill-textarea.json
Adds the files to components/uibrik/spill-textarea and installs motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/spill-textarea.

Usage

import { SpillTextarea } from "@/components/uibrik/spill-textarea/spill-textarea";​const defaultValue = "Shipping the new editor today. Drafts now save as you type and sync across";​<SpillTextarea  limit={80}  overflow="fall"  gravity={1}  warnAt={0.8}  countFrom={20}  color="#ef4444"  warnColor="#f59e0b"  radius={16}  defaultValue={defaultValue}  placeholder="What's happening?"  label="Message"  minRows={3}  maxRows={8}  onChange={(value, over) => {}}  // value="…"/>

Where to use Spill Textarea

  • Post composers

    Short-form posts and replies show their limit without a wall of numbers.

    Pairs with Prompt Input

  • Bios and descriptions

    Profile and listing fields make going over obvious before the save fails.

    Pairs with Settings Page

  • SMS and push copy

    Message writers see exactly which characters won't fit.

Props

SpillTextarea
limit
Type number
80
Characters allowed before letters fall.
overflow
Type "fall" | "copy"
"fall"
What happens to a letter typed past the limit.
gravity
Type number
1
How hard letters fall.
warnAt
Type number
0.8
Share of the limit at which the ring turns amber.
countFrom
Type number
20
Remaining characters at which the number appears.
color
Type string
"#ef4444"
Colour of over-limit letters.
warnColor
Type string
"#f59e0b"
Ring colour near the limit.
radius
Type number
16
Corner radius.
value
Type string
–
Controlled value.
defaultValue
Type string
""
Starting text when uncontrolled.
onChange
Type (value: string, over: boolean) => void
–
Called with the text and whether it is over the limit.
placeholder
Type string
"What's happening?"
Placeholder text.
label
Type string
"Message"
Accessible name for the field.
minRows
Type number
3
Rows shown when empty.
maxRows
Type number
8
Rows it grows to before scrolling.
className
Type string
–
Classes for the wrapper.