ViraStack
  • About
  • Support
HomeGet StartedExamples
ViraStack

A DX-first toolkit for frontend developers: starters, agent rules, form hooks, and a guide.

Products

  • ViraStack Start
  • ViraStack AI
  • ViraStack Mask
  • ViraStack Password
  • ViraStack Guide

Explore

  • About
  • Brand
  • Support

© 2026 ViraStack.

Open source · MIT

Examples

  • All
  • Alpha
  • Card
  • Credit card form
  • Currency
  • CVV
  • Date
  • Email
  • Expiry
  • IBAN
  • Numeric
  • Password
  • Phone
  • Tax number (VKN)
  • TCKN
  • Text
  • URL
  • Username
  • ZIP code

Username

Slugify: lowercase, accent stripping, spaces → hyphens.

← All examples·username

Preview

rawValue: -

value: -

import { useForm } from "react-hook-form"
import { useViraMask } from "@virastack/mask"
 
function Example() {
  const form = useForm<{ username: string }>()
  const { username } = useViraMask({
    form,
    schema: { username: "username" },
  })
 
  const { rawValue, ...inputProps } = username
 
  return <input {...inputProps} placeholder="omer-gulcicek" />
}

Details

  • Preset: "username"
  • usernameFormat: true

See useViraMask() for the hook API and custom mask for custom masks.

PreviousURLNextZIP code

On this page

  • Preview
  • Details
Something wrong? Fix it