@empoweredvote/ev-ui
v0.2.2
Published
Shared React component library for the [Empowered Vote](https://empowered.vote) civic engagement platform. Used across CompassV2, essentials, read-rank, civic-spaces, and other Empowered Vote apps.
Readme
@empoweredvote/ev-ui
Shared React component library for the Empowered Vote civic engagement platform. Used across CompassV2, essentials, read-rank, civic-spaces, and other Empowered Vote apps.
Installation
npm install @empoweredvote/ev-uiThe package is on public npm — no auth or .npmrc configuration required.
Peer dependencies
npm install react react-dom @react-spring/webSupported versions: React 17+, @react-spring/web 9+.
Usage
import { RadarChartCore, PoliticianCard, SiteHeader } from '@empoweredvote/ev-ui';
import { BallotIcon, CompassIcon } from '@empoweredvote/ev-ui';Design tokens
Design tokens (colors, spacing, typography) are exported separately and can be used directly or via the Tailwind preset:
// tailwind.config.js
import evPreset from '@empoweredvote/ev-ui/tailwind-preset';
export default {
presets: [evPreset],
// your config
};Direct token import:
import { colors, spacing } from '@empoweredvote/ev-ui/tokens';Components
Charts
RadarChartCore— Interactive radar/spider chart with animated transitions, dual dataset overlays (e.g., your compass vs. a politician's), clickable spokes for inversion, and dynamic label wrapping.
Politician Display
PoliticianCard— Politician summary card with photo, title, districtPoliticianProfile— Full profile page with contact, bio, legislative recordCommitteeTable— Committee memberships and leadership rolesLegislativeInlineSummary,LegislativeRecord— Bill/vote historyJudicialScorecard,JudicialRecordDetail— Judicial record displaySocialLinks— Social media icon linksIssueTags— Topic/issue tag pillsStanceAccordion— Collapsible stance list by topic
Layout
SiteHeader— Top nav bar withdefaultNavItems,defaultCtaButtonhelpersHeader— Simpler page headerFilterSidebar— Filterable sidebar for results pagesCategorySection,SubGroupSection,GovernmentBodySection— Grouped content sections
Forms
AuthForm— Login/signup form
Icons
BallotIcon,CompassIcon,BranchIcon
Hooks
useMediaQuery(query)— Responsive breakpoint hook
Releasing
This package uses an automated publish-and-fan-out pipeline:
npm version patch # or minor / major
git push origin main --follow-tagsThat's it. The tag push triggers .github/workflows/publish.yml which:
- Publishes to npm using OIDC trusted publishing (no
NPM_TOKEN— provenance attestations auto-generated) - Fires
repository_dispatchto every consumer repo - Each consumer opens a PR bumping the dependency
- Patch/minor bumps auto-merge after build-check passes
- Render auto-deploys each consumer on merge
See README-AUTOBUMP.md for full pipeline details, how to add a new consumer, and debugging tips.
Development
npm install
npm run build # tsup produces ESM + CJS bundles to dist/Design System Viewer
Design tokens are also rendered to a design system preview page deployed to GitHub Pages whenever design-system/ or src/tokens.js changes on main. See .github/workflows/deploy-design-system.yml.
License
Internal / Empowered Vote organization. See repository for details.
