# Installation (/docs/installation)



## Install Luke UI [#install-luke-ui]

Install Luke UI and React Aria Components. Luke UI uses the application's React Aria Components
instance so shared contexts remain compatible.

```bash
pnpm add @luke-ui/react react-aria-components
```

## Set up the theme [#set-up-the-theme]

Import `@luke-ui/react/stylesheet.css` and one theme stylesheet at your application root. This guide
uses Tactile. To use Paper, import `@luke-ui/react/themes/paper/stylesheet.css` instead.

Apply `rootClassName` to an element you own, such as the application shell. The theme stylesheet
supplies the semantic variables. `rootClassName` adds the reset and base typography.

apps/docs/src/samples/theming/getting-started.tsx

```tsx
import '@luke-ui/react/stylesheet.css';
import '@luke-ui/react/themes/tactile/stylesheet.css';
import { rootClassName } from '@luke-ui/react/theme';
import type { PropsWithChildren } from 'react';

export function App({ children }: PropsWithChildren) {
	return (
		<body className={rootClassName}>
			<header />
			<main>{children}</main>
			<footer />
		</body>
	);
}
```

## Use components [#use-components]

Import each component from its package path.

apps/docs/src/samples/overview/welcome.tsx

```tsx
import { Button } from '@luke-ui/react/button';
import { Text } from '@luke-ui/react/text';

export function Welcome() {
	return (
		<>
			<Text>Welcome to Luke UI.</Text>
			<Button>Continue</Button>
		</>
	);
}
```

## Change the theme [#change-the-theme]

Tactile is the default bundled theme. Paper uses the same component APIs with a flatter visual
treatment. Switch which theme stylesheet you import to change the theme.

apps/docs/src/samples/overview/paper-theme.tsx

```tsx
import '@luke-ui/react/themes/paper/stylesheet.css';
import { rootClassName } from '@luke-ui/react/theme';
import type { PropsWithChildren } from 'react';

export function App({ children }: PropsWithChildren) {
	return <div className={rootClassName}>{children}</div>;
}
```

Set `data-color-mode="light"` or `data-color-mode="dark"` on a themed element when the application
must use a specific mode. Without it, Luke UI follows the system preference.

## Continue learning [#continue-learning]

<Cards>
  <Card href="/docs/styling" title="Styling">
    Learn how component APIs, utilities, and tokens fit together.
  </Card>

  <Card href="/docs/layout" title="Layout">
    Build responsive structure with Box.
  </Card>

  <Card href="/docs/theming" title="Theming">
    Understand how the theme root, identity, and tokens fit together.
  </Card>

  <Card href="/components/actions/button" title="Components">
    Browse the components available to developers.
  </Card>
</Cards>
