Skip to content

Components Overview โ€‹

Button Component Available

The Sando Button component is now available! Other components are under active development. Check back soon or watch the repo for updates.

Planned Features โ€‹

When complete, Sando will provide a collection of accessible Web Components built with Lit:

  • โšก Framework-agnostic: Works with React, Vue, Angular, Svelte, or vanilla JS
  • โ™ฟ Accessible: WCAG 2.1 AA compliant
  • ๐ŸŽจ Themeable: Token-driven styling with flavor support
  • ๐Ÿ“ฆ Tree-shakeable: Import only what you need
  • ๐Ÿ”’ TypeScript: Full type safety
  • ๐Ÿงช Tested: Comprehensive unit and E2E tests

Available Components โ€‹

โœ… Button โ€‹

Versatile, accessible button component with multiple variants, sizes, and advanced features including toggle support, icon-only mode, and link functionality.

Variants: solid, outline, ghost, text Sizes: xs, small, medium, large (all WCAG AA compliant 44x44px touch targets) States: default, hover, active, focus, disabled, loading Status: default, success, destructive Border Radius: none, default, full Features: icon-only, toggle buttons, render as link (href), icon props (start-icon/end-icon)

NEW in latest version:

  • โœจ Extra small (xs) size for compact UIs
  • โœจ Text variant for minimal inline links
  • โœจ Icon-only mode with circular option (radius="full")
  • โœจ Toggle button support with aria-pressed
  • โœจ Render as <a> tag with href attribute
  • โœจ Icon props (start-icon/end-icon) as alternative to slots
  • โœจ Enhanced accessibility (WCAG 2.1 Level AA)

View Button Documentation โ†’

๐Ÿ”œ Coming Soon โ€‹

  • Card - Container for content
  • Input - Text input field
  • Select - Dropdown selector
  • Modal - Dialog overlay
  • Tooltip - Contextual help
  • Badge - Status indicators
  • Avatar - User representation
  • Checkbox - Selection control
  • Radio - Single selection from group
  • Switch - Toggle control
  • Tabs - Content navigation
  • Alert - Notification messages

Installation (When Available) โ€‹

bash
# Coming soon to npm
pnpm add @sando/components @sando/tokens

Current Status

The Button component is fully functional with comprehensive tests. Additional components are in development. You can:

Planned Usage โ€‹

Once available, components will be used like this:

Import โ€‹

js
import '@sando/tokens/css'
import '@sando/components/button'

Use โ€‹

html
<sando-button
  variant="solid"
  size="medium"
  flavor="original"
>
  Button Text
</sando-button>

With TypeScript โ€‹

ts
/// <reference types="@sando/components" />

const button = document.querySelector('sando-button')
button.variant = 'solid'  // Will be type-safe

Framework Integration (Planned) โ€‹

React โ€‹

tsx
import '@sando/components/button'

function App() {
  return (
    <sando-button
      variant="solid"
      onClick={(e) => console.log('Clicked!')}
    >
      Click me
    </sando-button>
  )
}

Vue โ€‹

vue
<template>
  <sando-button
    variant="solid"
    @click="handleClick"
  >
    Click me
  </sando-button>
</template>

<script setup>
import '@sando/components/button'

const handleClick = () => console.log('Clicked!')
</script>

Angular โ€‹

ts
// app.module.ts
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'

@NgModule({
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
html
<!-- component.html -->
<sando-button
  variant="solid"
  (click)="handleClick()"
>
  Click me
</sando-button>

Planned Customization โ€‹

Override design tokens:

css
sando-button {
  --sando-button-solid-backgroundColor-default: #ff6b6b;
  --sando-button-solid-textColor-default: white;
}

Or apply flavors:

html
<sando-button variant="solid" flavor="original">
  Themed Button
</sando-button>

Planned Accessibility โ€‹

All components will be built with accessibility in mind:

  • โœ… Keyboard navigation
  • โœ… Screen reader support
  • โœ… ARIA attributes
  • โœ… Focus management
  • โœ… Color contrast (WCAG AA)

Browser Support (Target) โ€‹

  • โœ… Chrome/Edge 90+
  • โœ… Firefox 88+
  • โœ… Safari 14+
  • โœ… Opera 76+

Contributing โ€‹

Want to help build these components? Check out:

Next Steps โ€‹

While components are under development, you can:

Released under the MIT License.