Components
Cotton includes 88 accessible React components built on Radix UI primitives. All components are WCAG 2.1 AA compliant out of the box.
Interactive Documentation
Visit our Storybook for interactive examples, prop documentation, and live playground.
Component Categories
Form Controls
CottonButton— Primary action buttonCottonInput— Text input fieldCottonTextarea— Multi-line text inputCottonSelect— Dropdown selectCottonCheckbox— Checkbox inputCottonSwitch— Toggle switchCottonRadioGroup— Radio button groupCottonSlider— Range slider
Layout
CottonBox— Flexible containerCottonStack— Vertical/horizontal stackCottonFlex— Flexbox containerCottonGrid— CSS Grid containerCottonContainer— Max-width containerCottonSection— Page section
Data Display
CottonCard— Content cardCottonBadge— Status badgeCottonAvatar— User avatarCottonTable— Data tableCottonDataTable— Interactive data table
Feedback
CottonAlert— Alert messageCottonToast— Toast notificationCottonProgress— Progress barCottonSkeleton— Loading skeletonCottonSpinner— Loading spinner
Overlays
CottonDialog— Modal dialogCottonSheet— Slide-out panelCottonPopover— Popover contentCottonTooltip— TooltipCottonDropdownMenu— Dropdown menu
Navigation
CottonTabs— Tab navigationCottonBreadcrumb— Breadcrumb trailCottonPagination— Page navigationCottonSidebar— Sidebar navigation
Usage Example
import {
CottonButton,
CottonCard,
CottonInput,
CottonStack,
} from '@akrade/cotton-ui';
function LoginForm() {
return (
<CottonCard padding="lg">
<CottonStack gap="md">
<CottonInput label="Email" type="email" />
<CottonInput label="Password" type="password" />
<CottonButton variant="primary" fullWidth>
Sign In
</CottonButton>
</CottonStack>
</CottonCard>
);
}