# Nebula Design System > Nebula is Kaluza's React component library and design system. > It provides accessible, themeable UI components for building energy retail products. > Built with TypeScript, React, and styled-components. Full documentation: https://nebula.kaluza.com Installation: https://nebula.kaluza.com/get-started/setup --- ## Quick Reference All components are imported from `@kaluza-platform/nebula`: ```tsx import { Page, Card, PrimaryCTAButton } from '@kaluza-platform/nebula'; ``` Nebula requires a styled-components ThemeProvider at the app root: ```tsx import { ThemeProvider } from 'styled-components'; import { theme } from '@kaluza-platform/nebula'; ; ``` ### Page structure Every app page should use `Page` as the root layout: ```tsx Page title {/* Page content here */} ``` ### Form structure Forms use `Form`, `FormFields`, and `FormActions`: ```tsx
Submit Cancel
``` Fields inside `FormFields`. Buttons inside `FormActions`. Error handling is built in — pass an `errors` array to `Form` and field errors are set automatically via context using each field's `name` prop. ### When to use CTAButton vs CTALink - `CTAButton` (Primary/Secondary/Destructive) — Performs an action on the current page: submitting a form, opening a modal, deleting an item. - `CTALink` — Navigates the user to a different page. Renders as an anchor element. Use this even if the link is styled to look like a button. ### When to use DateField vs DatepickerField - `DateField` — For entering an exact known date by typing (e.g. date of birth). No calendar popup. - `DatepickerField` — For selecting a date from a calendar popup or by typing (e.g. appointment booking). ### Rules Rules use this vocabulary: **Always** (required), **Never** (prohibited), **Avoid** (strongly discouraged), **Ensure** (verify before shipping). Full rationale in the linked guides. #### Forms — https://nebula.kaluza.com/guides/forms - **Always** ask for only the information you definitely need. - **Always** give every field a label — never use placeholder text as a label or hint. - **Always** validate on form submit, not as the user types. - **Always** display a list of errors at the top of the form using `ErrorSummaryNotification`. - **Always** use plain, concise language for error messages — avoid pleasantries like "please". - **Avoid** multi-column form layouts — error-prone and cause abandonment. - **Avoid** disabling buttons (except while submitting) — creates poor UX and excludes users with disabilities. - **Never** use HTML default validation — add `novalidate` to the `
`. - **Never** validate as the user types — it interrupts users mid-answer. - Nebula fields and buttons have **no disabled state** — use error handling or redesign the experience instead. #### Accessibility — https://nebula.kaluza.com/guides/accessibility - **Always** use plain English — no jargon or idioms; expand uncommon acronyms on first use. - **Always** accompany colour-only meaning with a symbol, emoji, or text — never rely on colour alone. - **Always** meet WCAG 2.1 Level AA contrast (1.4.3) for text against its background. - **Always** use semantic heading elements with correct nesting — one `

` per page/screen. - **Always** make link text meaningful out of context — avoid "click here" or "link". - **Always** add descriptive alt text to informative images; decorative images use empty alt (`alt=""`). - **Never** use images of text (logos excepted). #### Theming & configuration — https://nebula.kaluza.com/guides/theme - **Always** migrate `markRequiredFormFields` to `true` — the legacy default (`false`) will be removed once all teams have migrated. - When `markRequiredFormFields: true`: required fields show a red asterisk; mark genuinely optional fields with the `optional` prop; `Form` auto-renders the "Fields marked \* are required" key. - Applies to every Nebula field component (including `RadioField`, `CheckboxField`, `DateField`), not just `Field`-based components. --- ## Get Started - [Dev Setup](https://nebula.kaluza.com/llms/get-started/setup.txt): Get set up using Nebula in your app. - [Figma Setup](https://nebula.kaluza.com/llms/get-started/figma.txt): Get set up using Nebula in Figma. ## Foundations - [Borders](https://nebula.kaluza.com/llms/foundations/borders.txt): Border width, styles and radii for bounding elements. - [Colours](https://nebula.kaluza.com/llms/foundations/colour.txt): Colour palettes, semantic usage and accessibility requirements. - [Elevation](https://nebula.kaluza.com/llms/foundations/elevation.txt): Shadows, layers and z-indices for raised canvas elements. - [Interaction](https://nebula.kaluza.com/llms/foundations/interaction.txt): Active, hover and focus states for interactive elements. - [Layout](https://nebula.kaluza.com/llms/foundations/layout.txt): Responsive layout, breakpoints and grids. - [Motion](https://nebula.kaluza.com/llms/foundations/motion.txt): Speed, distance, direction and duration for animated elements. - [Spacing](https://nebula.kaluza.com/llms/foundations/spacing.txt): Padding, margins and white-space between elements. - [Typography](https://nebula.kaluza.com/llms/foundations/typography.txt): Fonts, scales and styles for typograpical elements. ## Components - [Accordion](https://nebula.kaluza.com/llms/components/accordion.txt): Accordions control the visibility of related sections of content. - [Badge](https://nebula.kaluza.com/llms/components/badge.txt): Badges bring the user's attention to something. - [Card](https://nebula.kaluza.com/llms/components/card.txt): Cards are used to define sections of content. - [Checkbox](https://nebula.kaluza.com/llms/components/checkbox.txt): Checkboxes allow users to enable and disable options. - [Chip](https://nebula.kaluza.com/llms/components/chip.txt): Chips help users make selections, filter content, or trigger actions - [Combobox Field](https://nebula.kaluza.com/llms/components/combobox-field.txt): Combo box is a searchable multi select or single select field with the ability to nest options into sub-menus. - [CTA Button](https://nebula.kaluza.com/llms/components/cta-button.txt): CTA Buttons perform an action on the page or submit a form. - [CTA Link](https://nebula.kaluza.com/llms/components/cta-link.txt): CTA Links direct users to a different page to complete an action. - [Currency Field](https://nebula.kaluza.com/llms/components/currency-field.txt): Currency Fields allow users to input an amount of money. - [Data Table](https://nebula.kaluza.com/llms/components/data-table.txt): Data Table is used to display data in a table. - [Date Field](https://nebula.kaluza.com/llms/components/date-field.txt): Date Fields allow users to input an exact date. - [Datepicker Field](https://nebula.kaluza.com/llms/components/datepicker-field.txt): Datepicker Fields allow users to input a date using a calendar popup or free text. - [Disclosure](https://nebula.kaluza.com/llms/components/disclosure.txt): Disclosure controls the visibility of content in context. - [Empty State](https://nebula.kaluza.com/llms/components/empty-state.txt): Let users know when there is nothing to show. - [Form](https://nebula.kaluza.com/llms/components/form.txt): Forms are used to capture user input. - [Heading](https://nebula.kaluza.com/llms/components/heading.txt): Headings create a semantic outline of the content. - [Icon](https://nebula.kaluza.com/llms/components/icon.txt): Icons provide additional context to elements on the page. - [Layout](https://nebula.kaluza.com/llms/components/layout-components.txt): Various layout components that help you build responsive and flexible layouts. - [List](https://nebula.kaluza.com/llms/components/list.txt): List is used for ordered and unordered lists. - [Modal](https://nebula.kaluza.com/llms/components/modal.txt): Modals display content in front of the main page. - [Monthpicker Field](https://nebula.kaluza.com/llms/components/monthpicker-field.txt): Monthpicker Fields allow users to input a month and year using a calendar popup or free text. - [Notification](https://nebula.kaluza.com/llms/components/notification.txt): Notifications notify the user with the status of an action. - [Page](https://nebula.kaluza.com/llms/components/page.txt): A standardised page layout including waymarkers and page-level actions. - [Progress Bar](https://nebula.kaluza.com/llms/components/progress-bar.txt): Shows how far through a process or task something is. - [Progress Stepper](https://nebula.kaluza.com/llms/components/progress-stepper.txt): Shows a user's progress through a multi-step form, and what's coming next. - [Radio](https://nebula.kaluza.com/llms/components/radio.txt): Radios are used to choose between multiple options. - [Select Field](https://nebula.kaluza.com/llms/components/select-field.txt): Select Fields allow users to choose from a list of options. - [Skeleton Loading](https://nebula.kaluza.com/llms/components/skeleton-loading.txt): Gives user an idea of what content is loading. - [Subcomponents](https://nebula.kaluza.com/llms/components/subcomponents.txt): Subcomponents are utilities used to create bespoke components. - [Summary List](https://nebula.kaluza.com/llms/components/summary-list.txt): Summary List provides a summary of data, generally from a form. - [Tabs](https://nebula.kaluza.com/llms/components/tabs.txt): Tabs allows the user to switch between content sections. - [Text](https://nebula.kaluza.com/llms/components/text.txt): Text is used for inline text elements. - [Text Field](https://nebula.kaluza.com/llms/components/text-field.txt): Text Fields allow users to input text and numbers. - [Text Link](https://nebula.kaluza.com/llms/components/text-link.txt): Text Link is to link to pages or anchor points. - [Textarea Field](https://nebula.kaluza.com/llms/components/textarea-field.txt): Textarea allows users to provide multiple lines of text. - [Timeline](https://nebula.kaluza.com/llms/components/timeline.txt): Timeline shows a series of content in chronological order - [Tooltip](https://nebula.kaluza.com/llms/components/tooltip.txt): Give supplementary non-critical context and provide term definitions - [Visually Hidden](https://nebula.kaluza.com/llms/components/visually-hidden.txt): Visually Hidden is used to give context to screen reader users. ## Guides - [About Nebula](https://nebula.kaluza.com/llms/guides/about-nebula.txt): Learn about Nebula and the problems it can help solve. - [Accessibility](https://nebula.kaluza.com/llms/guides/accessibility.txt): Learn how to build accessible apps following best practices. - [Component Criteria](https://nebula.kaluza.com/llms/guides/component-criteria.txt): Learn about what it takes to be a Nebula component. - [Contribution](https://nebula.kaluza.com/llms/guides/contribution.txt): Learn how to contribute to Nebula. - [Documentation](https://nebula.kaluza.com/llms/guides/documentation.txt): How to write documentation for Nebula. - [Forms](https://nebula.kaluza.com/llms/guides/forms.txt): Learn to build forms that follow best practices. - [Theming](https://nebula.kaluza.com/llms/guides/theme.txt): Learn how to create and customise a theme. - [Working with Nebula](https://nebula.kaluza.com/llms/guides/team-collaboration.txt): Improve team collaboration using the design system.