
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
ty-web-components
Advanced tools
Modern Web Components Library built with ClojureScript - Zero Dependencies, Semantic Design System, Advanced Modular Architecture
Modern web components library built with ClojureScript that provides reusable UI components as native Web Components. Zero runtime dependencies, semantic design system, and advanced modular architecture.
<!-- Core ty components -->
<script src="https://cdn.jsdelivr.net/npm/@ty/components@latest/ty.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ty/components@latest/css/ty.css">
<!-- Initialize components -->
<script>
ty.core.init();
</script>
<!-- Load specific components as needed -->
<script src="https://cdn.jsdelivr.net/npm/@ty/components@latest/ty-calendar.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@ty/components@latest/ty-dropdown.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@ty/components@latest/ty-multiselect.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Ty Components Demo</title>
<!-- Ty CSS Variables & Components -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ty/components@latest/dev/css/ty.css">
</head>
<body>
<!-- Your components work immediately -->
<ty-button>Click me!</ty-button>
<ty-input placeholder="Type here..."></ty-input>
<ty-calendar></ty-calendar>
<!-- Load core library -->
<script src="https://cdn.jsdelivr.net/npm/@ty/components@latest/dist/ty.js"></script>
<!-- Load component modules -->
<script src="https://cdn.jsdelivr.net/npm/@ty/components@latest/dist/ty-calendar.js"></script>
<!-- Initialize -->
<script>
ty.core.init();
</script>
</body>
</html>
Ty uses an advanced modular system where you can load only what you need:
ty.js - Core web component utilities, CSS variables system, base functionalityty-calendar-month.js - Month grid calendar componentty-calendar.js - Full calendar with navigation (depends on ty-calendar-month)ty-date-picker.js - Complete date picker interface (depends on ty-calendar)ty-dropdown.js - Dropdown selection componentsty-multiselect.js - Multi-selection component (depends on ty-dropdown)ty.js (core)
│
├── ty-calendar-month.js
│ └── ty-calendar.js
│ └── ty-date-picker.js
│
├── ty-dropdown.js
│ └── ty-multiselect.js
Ty uses a sophisticated 5-variant semantic CSS variables system:
<!-- Complete CSS system (recommended) -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ty/components@latest/dev/css/ty.css">
<!-- Or individual files -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ty/components@latest/dev/css/ty.variables.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ty/components@latest/dev/css/ty.utilities.css">
/* Text Colors (5-variant emphasis system) */
--ty-color-primary-strong: #0034c7; /* Maximum emphasis */
--ty-color-primary-mild: #1c40a8; /* High emphasis */
--ty-color-primary: #4367cd; /* Base emphasis */
--ty-color-primary-soft: #60a5fa; /* Reduced emphasis */
--ty-color-primary-faint: #93c5fd; /* Minimal emphasis */
/* Background Colors */
--ty-bg-primary-mild: #bfdbfe; /* Stronger background */
--ty-bg-primary: #dbeafe; /* Base background */
--ty-bg-primary-soft: #eff6ff; /* Softer background */
/* Available for: primary, secondary, success, danger, warning, info, neutral */
<!-- Toggle dark theme -->
<script>
document.documentElement.classList.toggle('dark');
</script>
<ty-button variant="primary">Primary Button</ty-button>
<ty-input placeholder="Enter text..." />
<ty-tag removable>Removable Tag</ty-tag>
<ty-calendar-month year="2024" month="12"></ty-calendar-month>
<ty-calendar></ty-calendar>
<ty-date-picker value="2024-12-25"></ty-date-picker>
<ty-dropdown>
<ty-option value="option1">Option 1</ty-option>
<ty-option value="option2">Option 2</ty-option>
</ty-dropdown>
<ty-multiselect values='["tag1", "tag2"]'></ty-multiselect>
<ty-modal id="my-modal">
<h2>Modal Content</h2>
<p>Your content here...</p>
</ty-modal>
<ty-popup trigger="click">
<button slot="trigger">Click me</button>
<div slot="content">Popup content</div>
</ty-popup>
<ty-tooltip message="Helpful information">
<span>Hover for tooltip</span>
</ty-tooltip>
export function MyComponent() {
return (
<div>
<ty-button onClick={handleClick}>Click me</ty-button>
<ty-calendar onDateSelect={handleDateSelect} />
</div>
);
}
<template>
<div>
<ty-button @click="handleClick">Click me</ty-button>
<ty-calendar @date-select="handleDateSelect" />
</div>
</template>
// app.module.ts
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
@NgModule({
schemas: [CUSTOM_ELEMENTS_SCHEMA],
// ...
})
<ty-button (click)="handleClick()">Click me</ty-button>
<ty-calendar (date-select)="handleDateSelect($event)"></ty-calendar>
<script>
// Set locale for date/number formatting
ty.i18n.setLocale('en-US');
// Components automatically use proper formatting
</script>
| Module | Gzipped Size | Components |
|---|---|---|
ty.js (core) | ~45KB | Base system, utilities |
ty-calendar-month.js | ~8KB | Calendar month grid |
ty-calendar.js | ~12KB | Full calendar + navigation |
ty-date-picker.js | ~6KB | Date picker interface |
ty-dropdown.js | ~15KB | Dropdown components |
ty-multiselect.js | ~10KB | Multi-selection |
<!-- Lock to specific version -->
<script src="https://cdn.jsdelivr.net/npm/@ty/components@1.0.0/dist/ty.js"></script>
<!-- Use latest minor/patch versions -->
<script src="https://cdn.jsdelivr.net/npm/@ty/components@1/dist/ty.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@ty/components@1.0/dist/ty.js"></script>
<!-- Always latest (development only) -->
<script src="https://cdn.jsdelivr.net/npm/@ty/components@latest/dist/ty.js"></script>
<meta http-equiv="Content-Security-Policy" content="
script-src 'self' cdn.jsdelivr.net;
style-src 'self' cdn.jsdelivr.net 'unsafe-inline';
">
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ty/components@latest/dev/css/ty.css">
</head>
<body class="ty-content">
<div class="p-8">
<h1 class="ty-text-primary-strong">Ty Components Demo</h1>
<div class="space-y-4">
<ty-button variant="primary">Primary Action</ty-button>
<ty-input placeholder="Enter your email..."></ty-input>
<ty-calendar></ty-calendar>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/@ty/components@latest/dist/ty.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@ty/components@latest/dist/ty-calendar.js"></script>
<script>
ty.core.init();
// Event handling
document.body.addEventListener('date-select', (event) => {
console.log('Selected date:', event.detail.date);
});
</script>
</body>
</html>
<script>
function toggleTheme() {
const isDark = document.documentElement.classList.toggle('dark');
localStorage.setItem('theme', isDark ? 'dark' : 'light');
}
// Initialize theme from localStorage
const savedTheme = localStorage.getItem('theme');
if (savedTheme === 'dark') {
document.documentElement.classList.add('dark');
}
</script>
<ty-button onclick="toggleTheme()">Toggle Dark Mode</ty-button>
All ty components dispatch standard DOM events:
// Calendar date selection
element.addEventListener('date-select', (event) => {
const { date, value, context } = event.detail;
});
// Input value changes
element.addEventListener('input', (event) => {
const { value, formattedValue, rawValue } = event.detail;
});
// Multiselect changes
element.addEventListener('change', (event) => {
const { values, action, item } = event.detail;
});
Customize the entire design system:
:root {
/* Override brand colors */
--ty-color-primary: #your-brand-color;
--ty-color-secondary: #your-secondary-color;
/* Adjust spacing */
--ty-spacing-base: 1rem;
/* Modify typography */
--ty-font-sans: 'Your Font', system-ui, sans-serif;
}
Visit our GitHub repository to:
MIT License - feel free to use in personal and commercial projects.
Made with ❤️ using ClojureScript and Web Standards
FAQs
Modern Web Components Library built with ClojureScript - Zero Dependencies, Semantic Design System, Advanced Modular Architecture
The npm package ty-web-components receives a total of 1 weekly downloads. As such, ty-web-components popularity was classified as not popular.
We found that ty-web-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.