# Pages, shared components, hooks, and directives Use this topic when adding or changing pages, shared UI, themes, bilingual copy, Vue hooks, or directives. TablePro and layout have narrower entry points: [tables](table-pro.md) and [layout](layout.md). | Question | Read first | Follow through | | -------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Pages, login, and demos | [Views](../../apps/admin/src/views), [login page](../../apps/admin/src/views/login/index.tsx), [demo page structure](../../apps/admin/src/views/demo/components/DemoPage.tsx) | [Route registration](routing.md), [visual conventions](../../docs/ui-design.md) | | Shared components such as Modal, Segment, charts, and barcodes | [Application component entry point](../../apps/admin/src/components/index.ts), [shared UI exports](../../packages/ui/package.json) | [Implementations](../../packages/ui/src), [API reference](../../apps/docs/reference/components.md) | | Components and providers that depend on template state | [Application component guide](../../apps/admin/src/app-components/README.md) | [App composition](../../apps/admin/src/App.tsx), [Naive UI autocomplete defaults](../../apps/admin/src/app-components/provider/AppAutocompleteDefaults) | | Themes, styles, and application copy | [Design configuration](../../apps/admin/src/app-config/design-config.ts), [style entry point](../../apps/admin/src/styles/entry.ts), [locale resources](../../apps/admin/src/locales/README.md) | [Application theme hook](../../apps/admin/src/hooks/template/useTheme.ts), [shared theme](../../packages/ui/src/theme.css), [documentation-site styles](docs.md) | | Hooks and global directives | [Application hooks](../../apps/admin/src/hooks/index.ts), [shared composables](../../packages/composables/src/index.ts), [application directive registration](../../apps/admin/src/directives/index.ts) | [Hook guide](../../apps/admin/src/hooks/README.md), [shared directives](../../packages/directives/src/modules), [directive usage](../../apps/admin/src/directives/README.DIR.md) | The application's `@/components` and some hook/directive paths retain compatibility exports. Follow exports into the owning shared package before fixing common behavior. Inject host-specific services instead of referencing application aliases from shared packages. Add both Chinese and English for new interface copy. For custom CSS, follow the [semantic-token and scope contract](../../docs/ui-design.md#custom-css), then use the [reader recipe](../../apps/docs/guide/appearance.md#custom-css) or [independent-host example](../../apps/docs/examples/ThemeScopeExample.vue). The authoritative token definitions remain in [theme.css](../../packages/ui/src/theme.css) and its [mapping](../../packages/ui/src/theme-presets.ts); do not copy preset palettes into page styles. Before adding a component, check existing capabilities using the [Harness reuse conventions](../README.md#engineering-conventions). For full-height content and independent scrolling, start with [TablePro height styles](../../packages/ui/src/RTablePro/src/index.scss), [layout height variables](../../packages/admin-shell/src/layout-css-vars.ts), and the [user management page](../../apps/admin/src/views/user-management/index.tsx). `RTablePro autoHeight` uses `--r-table-height` to fill its host. Naive UI's `NCard contentScrollable` and `NScrollbar` handle scrolling; the parent uses Flex/Grid and `min-block-size: 0` to provide a definite height that can shrink. Targeted verification: for small fixes, run the relevant [component](../../__test__/components), [hook](../../__test__/hooks), or [cross-package consumer](../../__test__/workspace/consumer.spec.tsx) test file. Use `pnpm harness verify ui` for scope-level regression coverage; it runs Vitest without launching a browser. For visible effects or interactions, choose pages and dimensions using [Harness browser verification](../README.md#browser-verification).