Text morph
A React component in Beamline's Content & display category, in the free sample.
A short label that becomes its next state letter by letter: shared letters glide into place, new ones arrive, old ones leave.
Use it for
- A status label that changes: Connecting → Syncing → Up to date.
Not for
- Long text or paragraphs.
Anatomy
- letters
States
- rest
- morphing (shared letters glide, new ones arrive, old ones leave; the width eases with them)
Keyboard
- Not interactive
Motion
Letters move on the morph spring (no bounce) and arrive/leave with a 3px rise and the subtle blur; the label's width eases from the old text's to the new one's (useWidthMorph, --pui-duration-morph), so what sits after it glides. Reduced motion swaps the text and the width at once. Letters move only when the text changes (layoutDependency on the text): a re-render with the same words after a scroll, a resize or a parent's update leaves them still.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
children | string | — | A short label; when it changes, letters it shares with the old one slide into place and the rest fade. |
as | tag | — | HTML element used for the text or container. Defaults to "span". |
classNames | TextMorphClassNames | — | Classes for the named visual parts; no part overrides by default. |
style / ref | CSSProperties / native Ref | — | style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default. |
className | string | — | Classes on the documented visual root; no override by default. |
id | string | — | DOM id on the animated text root; omitted by default. |
style | CSSProperties | — | Inline styles on the documented visual root; no inline overrides by default. |
ref | Ref<HTMLElement> | — | Receives the documented root element; no ref by default. |
Used in
- Account ledger
- Accounting workbench
- Agency book
- Agent builder
- Agent monitor
- Agent runs monitor
- Analytics dashboard
- API keys & webhooks
- Applicant projects
- Appointment book
- Approval policy
- Artifact workbench
- Asset library
- Asset workspace
- Audience segments
- Audit room
- Benefit changes
- Billing desk
- Services and hours
- Budget month
- Call sheet
- Captions
- Care plan
- Case workspace
- Change orders
- Insurance claims
- Click heatmap
- Client forms
- Content workbench
- Collection batch edit
- Component properties
- Component source
- Contact profile
- Content releases
- Corrective actions
- Counter service
- Course builder
- Course dashboard
- Course home
- Crew booking
- CRM pipeline
- Customer requests
- Cut review
- Cycle planner
- Dashboard controls
- Dashboard panels
- Data binding
- Database builder
- Day agenda
- Desk booking
- Dispensing
- Document review
- Drawing board
- Email automation
- Engineering changes
- Equipment register
- Estimate share
- Event evidence
- External review
- File manager
- Flight logbook
- Gift batches
- Gift desk
- Goods receiving
- Grading desk
- Guest messages
- Guest review
- Health questionnaire
- Helpdesk inbox
- Hiring pipeline
- Hours ledger
- AI image studio
- Import runs
- Inspection review
- Instructor finder
- Inventory counts
- Issue workbench
- Issued ticket
- Item setup
- Job booking setup
- Job card
- Job materials
- Kit builder
- Knowledge base manager
- Label designer
- Language preview
- Layout inspector
- Linked appointments
- Localization overview
- Maintenance plan
- Maintenance plans
- Map annotations
- Map explorer
- Market screener
- Matrix question
- Media collection
- Messaging journeys
- Metadata fields
- Model inspector
- Model issues
- Model playground
- Model workbench
- My shift
- Newsletter desk
- Note templates
- Notification preferences
- Nutrition library
- Order closeout
- Order composer
- Order history and fills
- Order ledger
- Owner records
- Packages & memberships
- Parts tracker
- Patient chart
- Patient overview
- Payroll approvals
- Payroll cycles
- Permit fees
- Plan acceptance
- Plan comparison
- Plan follow-up
- Plan readiness
- Plan templates
- Policy rules
- Portfolio overview
- Post performance
- Post release
- Pre-flight briefing
- Print quote
- Print scheduler
- Probing chart
- Procedure picker
- Product analytics
- Program modules
- Project home
- Project signals
- Projects
- Proposal payments
- Protocol builder
- Prototype task
- Publishing team
- Purchase order desk
- Purchase orders
- Purchasing rules
- Quality checks
- Query library
- Question builder
- Queue settings
- Reading library
- Reconciliation
- Record catalogue
- Record search
- Record setup
- Record sharing
- Recruiter home
- Rental policy
- Report builder
- Report library
- Research synthesis
- Reservation desk
- Resource booking
- Rooms & equipment
- Restock desk
- Retention analysis
- Return request
- Review page builder
- Review share
- Rig editor
- Roof layout
- Room readiness
- Run of show
- Sales dashboard
- Saved views
- Screenplay revisions
- Segment editor
- Serial allocation
- Service estimate
- Service tasks
- Session notes and tasks
- Session replay
- Settings
- Shared inbox
- Shift planner
- Shift rotations
- Shop floor
- Shot list
- Signature fields
- Slide presenter
- Social media scheduler
- Special orders
- Stage reports
- Status dashboard
- Stay folio
- Stock alerts
- Stock count
- Stock moves
- Study setup
- Submittal register
- AI support chat
- AI support console
- Table service
- Task results
- Team calendar
- Team & members
- Text styles
- Ticket orders
- Ticket setup
- Timesheet review
- Trading terminal
- Training progress
- Transaction review
- Transition sequence
- Translation editor
- Translation key
- Translation workbench
- Treatment plan
- Tree test
- Versioned document
- Visit board
- Visitor desk
- Volunteer rota
- Waitlist desk
- Work orders
- Workflow builder
- Workflow composer
- Workflow library
Dependencies
motion
Import
import { TextMorph } from "@beamline/text-morph";
Get it
Text morph is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Text morph is included in the free MIT sample. Get Beamline · Connect your agent
More in Content & display
- Image compare: Two images in one frame with a divider: drag anywhere, or arrow keys on the handle; horizontal or vertical, with captions.
- Revision compare: Two revisions of a drawing on one camera: side by side, they pan and zoom together (a crosshair in one pane marks the point under the pointer in the…
- Live cursors: Who else is working on this, and where: over any shared surface, each person's pointer in the colour their name always gets, with a name flag, gliding…
- Document viewer: A PDF or a paged document read and marked up in place: page thumbnails beside it, zoom to the width, the page or a percentage, pages by keyboard, a…
- Video player: A video player on the native <video> element: title bar with an external link and close, centre play with ±10 s, scrub, time, volume, speed, captions…
- Lightbox: A full-screen image viewer: a thumbnail grows into it and shrinks back, arrows and ←/→ step through the set, Esc or a downward drag closes it.
- File diff: A change to one file as a unified diff: line numbers, tinted lines, only the changed words marked, long unchanged stretches folded; give rows or just…
- QR Code: A scannable code set as gradient dots with rounded finder rings and an optional centre mark; a new value ripples out from the centre.
- Data matrix: A DataMatrix (ECC 200, ISO/IEC 16022) any scanner reads: crisp square modules in SVG at any size, the smallest symbol that holds the value (10×10 to…
- Slot text: Text and numbers that roll into their new value on reels, digit by digit from the right; other characters fade. Read as plain text by assistive tech.
- Text reveal: A headline whose words rise into place once, the first time it scrolls into view; never repeats.
- Code block: Code to read and copy: highlighted in the system's colours, numbered, marked lines, long files folded behind “Show all”.
- Inbox list: Conversations waiting for a person, triaged in place: sender, subject and the first words, time, unread weight, star, labels and attachments, grouped by…
- Comment thread: A discussion attached to something: replies, reactions, @mentions, editing and deleting your own, resolve that folds the thread.
- Timeline: What happened, newest first and grouped by day: people with avatars, systems with toned icons, relative times with the exact time on hover, details in…
- Description list: The details of one record as label and value pairs: beside each other or stacked, in as many columns as the room holds; a copy button arrives on the row…
- Text shimmer: Ongoing work said in words (“Thinking…”) with a calm band of light passing across them; stops when inactive.
- Logo Carousel: A wall of logos shown a few at a time: every few seconds the slots turn left to right, each logo leaving upward as the next rises in.
- Avatar group: A team in a small space: overlapping faces that name themselves on hover or focus, and “+N” naming the rest.
- Avatar: A person or account in a small space: a photo, or initials on the hue their name always gets; presence dot; circle for people, square for companies.
- Item: The generic list row: media, title, description, meta and trailing actions; becomes a link or button when interactive.
- Marker: A labelled point in a stream: a status event with an icon between messages, or a label such as "Today" between two hairlines.
- Credit: "Designed with Beamline" for a site's footer: the Beamline mark and a quiet line, or a small badge. With your partner code, each new customer's first…
- Badge: A short status, category or count label: six tones, an icon or a status dot, two sizes.
- Kbd: Keyboard keys as keycaps, for combinations and sequences (G then A); `mod` resolves to ⌘ or Ctrl per platform, symbols are spoken as words.