motionsnack

Animated React sections that already feel finished.

Copy them into Next.js or add them with one command. Plain React and Tailwind, light and dark.

New sections, once a month

One short email when something new lands. No spam.

Library

  • Sections
  • Blocks
  • Components
  • Application UI
  • Templates

Popular

  • Hero
  • Gallery
  • Testimonials
  • Stats
  • Logos
  • FAQ

Resources

  • Installation
  • All components
  • All blocks
  • All sections
  • All application UI
  • Design system
  • Changelog
  • Pricing

Company

  • About
  • Contact
  • Terms
  • Privacy

Install

npx motionsnack add <name>Step-by-step guidehello@motionsnack.dev
Kuba Šťastný@kubastastnydev

© 2026 motionsnack. All rights reserved.

TermsPrivacy

motionsnack

motionsnack
DocsSectionsTemplatesWhat's newPricing
Get lifetime access
  1. Home
  2. Docs
  3. Components
  4. Input
  5. Button Input
ComponentsBlocksSectionsApplication UI
ComponentsBlocksSectionsApplication UI

Accordion

  • Spring Accordion

Alert

  • Glow Alert

Audio

  • Podcast PlayerNew
  • Voice NoteNew
  • Voice RecorderNew

Avatar

  • Avatar Stack

Badge

  • Pulse Badge

Breadcrumb

  • Slide Breadcrumb

Button

  • Chip ButtonNew
  • Glow Border Button
  • Glow ButtonNew
  • Plain ButtonNew

Calendar

  • Month Calendar

Checkbox

  • Checkbox CardsNew
  • Checkbox GroupNew
  • Chip CheckboxNew

Cropper

  • Image Cropper

Dialog

  • Spring Dialog

Dropdown

  • Command MenuNew
  • Stagger Dropdown
  • Switcher DropdownNew

File Upload

  • Drop Zone Upload

Input

  • Addon InputNew
  • Button InputNew
  • Copy InputNew
  • Date InputNew
  • Floating Label Input
  • Joined InputsNew
  • Notched Label InputNew
  • Number StepperNew
  • OTP InputNew
  • Password InputNew
  • Phone InputNew
  • Range InputNew
  • Search InputNew
  • Tag InputNew
  • Text FieldNew

Loader

  • Curtain LoaderNew
  • Greeting LoaderNew
  • Line LoaderNew
  • Meter LoaderNew
  • Split LoaderNew

Navigation Menu

  • Mobile Tab BarNew

Notification

  • Notification BellNew
  • Toast Stack

Pagination

  • Sliding Pagination

Popover

  • Spring Popover

Radio

  • Card Radio Group
  • Payment MethodNew
  • Radio GroupNew
  • Rating RadioNew

Select

  • ComboboxNew
  • Glide Select
  • Multi SelectNew
  • Rich SelectNew
  • Select FieldNew
  • Tree SelectNew

Sidebar

  • Icon RailNew

Slider

  • Glow Slider

Stepper

  • Progress Stepper

Switch

  • Billing SwitchNew
  • Switch RowNew
  • Toggle SwitchNew

Table

  • Sortable Table

Tabs

  • Sliding Tabs

Textarea

  • Auto Grow Textarea

Toggle

  • Icon ToggleNew
  • Theme ToggleNew
  • Toggle GroupNew

Tooltip

  • Follow Tooltip

Input

Button Input

New

An e-mail field with a subscribe button that checks the address, spins while sending and fades into a thank-you line.

npx motionsnack add button-input

Customize

Error Colour
px
px
ms
<ButtonInput />

Props

28 properties

PropertyTypeDefaultDescription
valuestring-Controlled value. Leave undefined to let the component manage it.
defaultValuestring''Value on first render when uncontrolled.
onChange(value: string) => void-Called with the new text on every change.
onSubmit(email: string) => void | Promise<unknown>-Called with a valid e-mail. A returned promise keeps the spinner until it settles; a rejection shows the error text. Without it the submit is simulated.
errorstring''Error message from the caller (e.g. a server error). Wins over the built-in messages.
buttonColorstring-Deprecated: section styling. The button is the inverse fill.
buttonTextColorstring-Deprecated: section styling. The button is the inverse fill.
buttonRadiusnumber-Deprecated: the button follows the field.
namestring-Name submitted with a form.
idstringgeneratedId of the input.
classNamestring''Extra classes on the wrapper.
layout'inside' | 'attached' | 'separate''inside'Button inside the field, joined to it, or next to it (stacks on narrow widths).
labelstring''Label above the field. Empty hides it; the placeholder then names the field for screen readers.
placeholderstring'you@studio.com'Hint inside the empty field.
buttonLabelstring'Subscribe'Text of the button.
helperTextstring'One e-mail a month. No spam.'Small text under the field. Empty hides it.
successTextstring'Thanks! Check your inbox to confirm.'Line shown after a successful submit.
invalidTextstring'Enter a valid e-mail address.'Message when the address is not a valid e-mail.
errorTextstring'Something went wrong. Please try again.'Message when onSubmit rejects.
resetLabelstring'Use another address'Link that brings the field back after a successful submit.
allowResetbooleantrueOffer the reset link after a successful submit.
icon'mail' | 'none''mail'Icon at the start of the field.
disabledbooleanfalseDisables the field and the button.
requiredbooleanfalseMarks the field as required.
errorColorstring''Error colour for both themes. Empty uses the per-theme pair.
heightnumber48Height of the field.
radiusnumber12Corner radius of the field for the attached and separate layouts. The inside layout is always a pill.
simulateMsnumber900How long the submit takes when there is no onSubmit.

About Button Input

Button Input is the newsletter field every site needs: an e-mail address and one button. The button sits inside the field, joined to its edge or next to it, and the separate layout stacks the two full width on narrow screens. Submitting checks the address first; a wrong one turns the field's border red with a short message. While onSubmit runs the label cross-fades into a spinner without changing the button's width, and once it settles the whole row fades into a line with a drawn check mark and a link to use another address. A rejected promise brings the field back with an error message. The button takes the site's buttonColor, buttonTextColor and buttonRadius, and every text is a prop.

What's included

  • Button inside, attached or separate
  • E-mail check with an error message
  • Spinner that keeps the button's width
  • Cross-fade into a success line with a drawn check
  • Async onSubmit with an error state
  • Site button colours and radius
  • Light and dark look
Type
Animated React input component
Library
Components · Input
Stack
Next.js, React, Tailwind CSS
Added
2026-11-23
Install
npx motionsnack add button-input