Base UI SolidJS 2
Unstyled components.
Finely reactive.
Accessible, headless building blocks for Solid. Every part, prop and interaction of Base UI, rebuilt on signals. You bring the styles.
@egoist/solid-base
Every Base UI part, on signals
38 components with the same parts, props, data attributes and keyboard behavior as upstream — written for Solid 2, not translated from React.
Accessible by default
Focus management, keyboard navigation and screen reader semantics come built in.
- Roving focus, typeahead and dismissal
- Focus traps, return focus and scroll locking
- RTL, labels and form validation
Arrow keys move between these tabs. Home and End jump to the ends.
import { Avatar } from '@egoist/solid-base/avatar';
type User = { handle: string; photo: string; initials: string };
export function UserAvatar(props: { user: User }) {
return (
<Avatar.Root
class={(state) => ['avatar', { loaded: state.imageLoadingStatus === 'loaded' }]}
render={(rootProps) => <a {...rootProps} href={`/@${props.user.handle}`} />}
>
<Avatar.Image src={props.user.photo} />
<Avatar.Fallback delay={600}>{props.user.initials}</Avatar.Fallback>
</Avatar.Root>
);
}Native to Solid 2
Live props and state, accessors and createX primitives. No virtual DOM, no re-renders.
- A render prop that runs once
- State as data attributes for styling
- Server rendering and hydration
Handbook
Styled by you, end to end
No CSS ships with the components. Use plain CSS, modules or utility classes against data attributes and CSS variables.
Style with any tool
Pass a class or a function of the component's state, then target state attributes.
- [data-checked], [data-open], [data-highlighted]
- CSS variables for sizes and positions
- Enter and exit transitions
[data-unchecked][data-checked][data-disabled]Components
The full set
- AccordionA set of collapsible panels with headings.
- Alert DialogA dialog that requires a user response to proceed.
- AutocompleteAn input that suggests options as you type.
- AvatarAn easily stylable avatar component.
- ButtonA button component that can be rendered as another tag or focusable when disabled.
- CheckboxAn easily stylable checkbox component.
- Checkbox GroupProvides shared state to a series of checkboxes.
- CollapsibleA collapsible panel controlled by a button.
- ComboboxAn input combined with a list of predefined items to select.
- Context MenuA menu that appears at the pointer on right click or long press.
- DialogA popup that opens on top of the entire page.
- DrawerA panel that slides in from the edge of the screen.
- FieldA component that provides labeling and validation for form controls.
- FieldsetA native fieldset element with an easily stylable legend.
- FormA native form element with consolidated error handling.
- InputA native input element that automatically works with Field.
- MenuA list of actions in a dropdown, enhanced with keyboard navigation.
- MenubarA menu bar providing commands and options for your application.
- MeterA graphical display of a numeric value within a range.
- Navigation MenuA collection of links and menus for website navigation.
- Number FieldA numeric input element with increment and decrement buttons, and a scrub area.
- OTP FieldA one-time password input composed of individual character slots.
- PopoverAn accessible popup anchored to a button.
- Preview CardA link that shows a destination preview without interrupting keyboard or screen reader navigation.
- ProgressDisplays the status of a task that takes a long time.
- RadioA radio button that is selected exclusively within a radio group.
- Radio GroupProvides shared state to a series of radio buttons.
- Scroll AreaA native scroll container with custom scrollbars.
- SelectA common form component for choosing a predefined value in a dropdown menu.
- SeparatorA separator element accessible to screen readers.
- SliderAn easily stylable range input.
- SwitchA control that indicates whether a setting is on or off.
- TabsA component for toggling between related panels on the same page.
- ToastGenerates toast notifications.
- ToggleA two-state button that can be on or off.
- Toggle GroupProvides a shared state to a series of toggle buttons.
- ToolbarA container for grouping a set of buttons and controls.
- TooltipA popup that appears when an element is hovered or focused, showing a hint for sighted users.
Build with Solid. Style it yourself.
Accessible primitives, finely reactive,
and entirely yours to design.