🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@ux_bob/yv-iwc

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ux_bob/yv-iwc

A React component for displaying YouVisit IWCs with syntax highlighting.

latest
npmnpm
Version
3.0.1
Version published
Maintainers
1
Created
Source

@ux_bob/yv-iwc

A React component for embedding YouVisit Interactive Web Component (IWC)

NPM JavaScript Style Guide

Installation

You can install the package using npm or pnpm:

npm install @ux_bob/yv-iwc
# or
pnpm add @ux_bob/yv-iwc

Usage

1. Import the CSS

First, import the CSS file in your app's root layout or main CSS file:

// In your layout.tsx, _app.tsx, or main.tsx
import '@ux_bob/yv-iwc/dist/index.css'

2. Use the Component

import React from 'react'
import { YouVisitIWC } from '@ux_bob/yv-iwc'

const App = () => {
  return (
    <YouVisitIWC
      containerWidth="100%"
      containerHeight="400px"
      title="Campus Tour"
      institution="your-institution-id"
      location="your-location-id"
      showCode={true}
    />
  )
}

export default App

Framework-Specific Setup

Next.js (App Router)

// app/layout.tsx
import '@ux_bob/yv-iwc/dist/index.css'

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  )
}

Next.js (Pages Router)

// pages/_app.tsx
import '@ux_bob/yv-iwc/dist/index.css'

export default function App({ Component, pageProps }) {
  return <Component {...pageProps} />
}

Create React App

// src/index.tsx or src/App.tsx
import '@ux_bob/yv-iwc/dist/index.css'

Vite

// src/main.tsx or src/App.tsx
import '@ux_bob/yv-iwc/dist/index.css'

Props

PropTypeRequiredDescription
containerWidthstringYesWidth of the IWC container (e.g., "100%", "800px")
containerHeightstringYesHeight of the IWC container (e.g., "400px")
titlestringYesTitle of the IWC experience
institutionstringYesInstitution ID for the YouVisit experience
locationstringYesLocation ID for the YouVisit experience
showCodebooleanNoWhether to display the embed code (defaults to false)
classNamestringNoCustom CSS class for the main container
codeContainerClassNamestringNoCustom CSS class for code snippet containers
copyButtonClassNamestringNoCustom CSS class for copy-to-clipboard buttons
headingClassNamestringNoCustom CSS class for section headings

Styling and Customization

The component comes with default styling that works out of the box. You can customize the appearance using the className props:

Basic Customization

<YouVisitIWC
  // ... other props
  className="my-custom-container"
  copyButtonClassName="my-custom-copy-button"
  headingClassName="my-custom-heading"
/>

CSS Framework Integration (Tailwind CSS)

<YouVisitIWC
  // ... other props
  className="max-w-4xl mx-auto bg-white rounded-lg shadow-lg"
  copyButtonClassName="bg-blue-500 hover:bg-blue-600 text-white font-semibold"
  headingClassName="text-2xl font-bold text-blue-600 border-b-2 border-blue-200"
/>

Custom CSS Classes

/* Your custom CSS */
.my-custom-copy-button {
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  padding: 12px 20px;
}

.my-custom-copy-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

Development

This repository contains both the main package and a Next.js testing app to validate the package functionality.

Package Development

See Development.md file for instructions and deployment.md for deployment steps.

# Install dependencies
pnpm install

# Run development build with watch mode
pnpm run dev

# Build the package
pnpm run build

Testing App

TBD

Deployment

This package uses Changesets for versioning and publishing. To release a new version:

  • Make your changes and commit them

  • Create a new changeset:

    pnpm changeset
    
  • Follow the prompts to:

    • Select the type of change (patch, minor, or major)
    • Provide a description of the changes
    • Confirm your choices
  • Commit the generated changeset file

  • Push your changes to the main branch

The GitHub Actions workflow will automatically:

  • Create a Release PR if there are any changesets to process
  • When the PR is merged, it will:
    • Update the package version
    • Generate/update the changelog
    • Publish to npm

FAQs

Package last updated on 26 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts