UNPKG

dap-design-system

Version:

Official design system for the DÁP (www.dap.gov.hu)

60 lines (38 loc) 2.78 kB
# Welcome to the DÁP design system component library This web component library is designed to be used with any frontend framework and is based on custom webcomponents with [litJS](https://lit.dev/). [Documentation](https://services.gov.hu/design-system-dev/) ## Quick start To get started with the DÁP Design System, follow these steps: Install the library using your preferred package manager or load it directly from a CDN: Package manager [(npm)](https://www.npmjs.com/package/dap-design-system) ```bash npm install dap-design-system yarn add dap-design-system pnpm add dap-design-system ``` CDN ```html <script type="module" src="https://cdn.jsdelivr.net/npm/dap-design-system" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/dap-design-system/dist/light.theme.css" /> ``` Start using the components in your application: ```jsx <dap-ds-button>My first button!</dap-ds-button> ``` That's it! You're now ready to start building beautiful web applications with the DÁP Design System Component Library. ## Benefits of web components Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps. Custom components and widgets build on the Web Component standards, will work across modern browsers, and can be used with any JavaScript library or framework that works with HTML. [Custom elements](https://html.spec.whatwg.org/multipage/custom-elements.html) in HTML are a way to define your own elements along with their behavior. You can use custom elements to create reusable components that can be used in web pages and web apps. Read more about web components [here](https://developer.mozilla.org/en-US/docs/Web/Web_Components). Web components are supported by all modern browsers, including Chrome, Firefox, Safari, and Edge. For more information on browser support, see [Can I Use](https://caniuse.com/custom-elementsv1). ## Architecture The DÁP Design System Component Library is built using the following technologies and libraries: - Components are built with [litJS](https://lit.dev/) - Component metadata is generated by the [Custom Elements Manifest Analyzer](https://github.com/open-wc/custom-elements-manifest) - Icons are from the [Remix icons](https://remixicon.com/) library - Positioning of dropdowns, tooltips is handled by [Floating UI](https://floating-ui.com/) - CDN hosting is provided by [jsDelivr](https://www.jsdelivr.com/) - Development and production tooling is provided by [Vite](https://vitejs.dev/) - [Storybook](https://storybook.js.org/) is used for component development and documentation - [Sass](https://sass-lang.com/) CSS preprocessor is used for styling - No styling framework is used, all styles are custom