DS

All Snippets

16 files

fade-in.css
CSS

css/animations/fade-in.css

Smooth fade-in animation utility classes with directional variants.

#animation#keyframes#fade+1
holy-grail.css
CSS

css/layouts/holy-grail.css

Classic holy grail layout using CSS Grid — header, footer, main, two sidebars.

#layout#grid#responsive+1
reset.css
CSS

css/utilities/reset.css

Modern CSS reset that removes inconsistencies across browsers without over-normalizing.

#reset#normalize#base+1
blue-header.html
HTML

html/components/blue-header.html

HTML snippet: blue-header.html

#html#components
navbar.html
HTML

html/components/navbar.html

Semantic, accessible navigation bar with mobile hamburger toggle.

#nav#accessible#responsive+1
purple-body.html
HTML

html/components/purple-body.html

HTML snippet: purple-body.html

#html#components
purple-footer.html
HTML

html/components/purple-footer.html

HTML snippet: purple-footer.html

#html#components
two-column-grid.html
HTML

html/layouts/two-column-grid.html

Two-column article layout with sidebar using semantic HTML5 elements.

#layout#grid#semantic+1
promise-pool.js
JavaScript

javascript/async/promise-pool.js

Concurrency-limited promise pool — run N promises at a time from a queue.

#async#promise#concurrency+1
retry-fetch.js
JavaScript

javascript/async/retry-fetch.js

Fetch wrapper with automatic retry, exponential backoff, and timeout.

#fetch#async#retry+1
event-delegation.js
JavaScript

javascript/dom/event-delegation.js

Efficient event delegation pattern to handle dynamic child elements.

#dom#events#performance+1
use-local-storage.ts
TypeScript

typescript/hooks/use-local-storage.ts

React hook for synced localStorage state with SSR safety.

#react#hook#storage+1
observer.ts
TypeScript

typescript/patterns/observer.ts

Observer / EventEmitter pattern with typed events and automatic cleanup.

#pattern#events#observer+1
singleton.ts
TypeScript

typescript/patterns/singleton.ts

Generic Singleton pattern implementation with lazy initialization.

#pattern#design-pattern#singleton+1
debounce.ts
TypeScript

typescript/utils/debounce.ts

Type-safe debounce utility that delays function execution until after a specified wait period.

#utility#performance#async+1
deep-merge.ts
TypeScript

typescript/utils/deep-merge.ts

Recursive deep merge of two objects with proper TypeScript generics.

#utility#objects#merge+1