hixme-ui social security component for consistent formatting.

Usage no npm install needed!

<script type="module">
  import hixmeUiSocialSecurity from 'https://cdn.skypack.dev/@hixme-ui/social-security';


Social Security

npm i --save @hixme-ui/social-security

View it live

Phone extends the @hixme/text to provide social security number formatting


import SocialSecurity from '@hixme-ui/social-security'

<SocialSecurity number='123456789' />
// ouputs social security format
// <span>***-**-6789</span>

SocialSecurity.format(number, { showFull = false })

SocialSecurity has a format function it uses to display, and is accessible if needed outside of the JSX

import SocialSecurity from '@hixme-ui/social-security'

// outputs string ***-**-6789

Phone.format('123456789', { showFull: true })
// outputs string 123-45-6789