41Components
6Categories
2Frameworks
0UI dependencies
Design system
My own design system in React and Vue
Shared tokens and one public API, written the way each framework expects.
Tokens. Custom properties with light-dark(), declared once for React and Vue
React. Hooks and TypeScript, no defaults on any prop, every decision visible
Vue 3. Composition API, the same props and events as in React
:root {
color-scheme: dark;
--color-accent: light-dark(#7c3aed, #2dd4bf);
}
.switch.md {
--switch-width: var(--size-40);
--switch-height: 22px;
}
.switch_box.active {
background: var(--color-accent);
border-color: var(--color-accent);
}import { useState } from "react";
import Switch from "@/components/library/react/Switch/Switch";
export default function Settings() {
const [notify, setNotify] = useState(true);
return (
<Switch
size={{ base: "sm", desktop: "md" }}
label="Email alerts"
checked={notify}
onChange={setNotify}
/>
);
}<script setup lang="ts">
import { ref } from "vue";
import Switch from "@/components/library/vue/Switch/Switch.vue";
const notify = ref(true);
</script>
<template>
<Switch
:size="{ base: 'sm', desktop: 'md' }"
label="Email alerts"
v-model="notify"
/>
</template>Philosophy
Building or delegating depends on the context
On a project in a hurry I'd use Radix or Reka. Here I build them myself to understand what they do inside.
Browse by category
Foundations
Forms
- InputText field with a floating label
- TextareaMultiline text field with a floating label
- TextFieldCompact text field with no visible label, named through aria-label
- SelectCustom dropdown with keyboard navigation
- SearchSearch field with suggestions filtered and highlighted as you type
- SearchFieldSearch field without suggestions, for filtering what is already on screen
- CheckboxCheckbox with an indeterminate state and a link inside its label
- RadioOption button for single-selection groups
- SwitchForm switch for boolean states
Actions
- ButtonAction button with variants and sizes
- ButtonLinkLink styled as a button
- ButtonEmailCopies the email to the clipboard with feedback
- ButtonScrollFloating back-to-top button
- ToggleUI button for boolean states, with no form behind it
- SegmentedSingle-choice control that folds into a dropdown when it can't fit
- PickerSingle-choice picker for toolbars, with no visible label
Display
- BadgeStatus indicator with variants
- TagLabel with a logo and a name, for technologies and tools
- CardStatStat card with a gradient number and animated counter
- ProgressBarLinear progress indicator
- ProgressRingCircular progress indicator with an animated counter
- IconCircleCircular container for icons
- ScrollHintAnimated indicator that invites scrolling
- TimelineTimeline whose dot aligns itself to every title
- AccordionSections that open and close, freely or one at a time
- TableData table with sorting, selection and two mobile modes
Navigation
- NavLinkNavigation link with active state
- NavLinkMobileMobile navigation link
- NavLinkSidebarPlayground sidebar link with active state
- LinkSectionLink to a section on the same page, with native scroll-spy
- LinkCardCard that links to another page, with a title and a description
- LinkIconIcon-only link with a real 24px touch target
- BurgerHamburger menu button
- LinkSocialCard-style link to external social profiles
- BreadcrumbHierarchical navigation trail with separators
- PaginationSeven-slot pager that turns compact when space runs out
This portfolio in 749 commits
341Build
- Feature192
- UI121
- Responsive24
- Animation3
- Kickoff1
209Maintain
- Refactor78
- Bugfix69
- Format37
- Removal20
- Moves5
106Care
- Accessibility48
- i18n24
- Copy20
- Performance10
- SEO4
93Infrastructure
- Docs66
- Tests9
- Config8
- Upgrades7
- Generated2
- Gitignore1