Stellar Device
This is a standalone Web Component for rendering arbitrary content inside of a device. The images have been optimized to deliver the best experience on any screen.
Disclaimer: I do not own any of the underlying product or user interface designs. By accessing these assets, you agree to obtain all necessary permissions from the underlying rights holders and/or adhere to any applicable brand use guidelines before using them. (disclaimer sourced from Facebook Design's devices resource: https://facebook.design/devices)
Apple devices have been sourced from Apple's official design resources site: https://developer.apple.com/design/resources/, and https://developer.apple.com/app-store/marketing/guidelines/#section-products
Android Devices sourced from Facebook Design's devices resource: https://facebook.design/devices
Using this component
See the autogenerated documentation here.
Script tag
- Put a script tag similar to this
<script src='https://unpkg.com/@stellar-design/device/dist/stellar-device.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
Node Modules
- Run
npm install @stellar-design/device --save
- Put a script tag similar to this
<script src='node_modules/@stellar-design/device/dist/stellar-device.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
In a stencil-starter app
- Run
npm install @stellar-design/device --save
- Add an import to the npm packages
import @stellar-design/device;
- Then you can use the element anywhere in your template, JSX, html etc
Stencil
Stencil is a compiler for building fast web apps using Web Components.
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
Getting Started
To start building new features, clone this repo to a new directory:
git clone https://github.com/splitinfinities/stellar-devices.git stellar-device
cd stellar-device
git remote rm origin
and run:
npm install
npm start
To build the component for production, run:
npm run build
To run the unit tests for the components, run:
npm test
Need help? Check out our docs here.