Bug: T308520 Bug: T311026 Bug: T316046 Bug: T325055 Bug: T325105 Bug: T325772 Bug: T329320 Bug: T329383 Bug: T329969 Bug: T329987 Bug: T330711 Change-Id: I0160b74a0ae77f3d7b36fe3e3b57b85762c62879 |
||
|---|---|---|
| .. | ||
| codex.mjs | ||
| codex.style-legacy-rtl.css | ||
| codex.style-legacy.css | ||
| codex.style-rtl.css | ||
| codex.style.css | ||
| codex.umd.js | ||
| LICENSE | ||
| README.md | ||
Codex
Codex is a toolkit for building user interfaces within the Wikimedia Design System. Codex contains:
- Vue components, in this package
- Design tokens, in the
@wikimedia/codex-tokenspackage - Icons, in the
@wikimedia/codex-iconspackage
For more details, read the Codex documentation.
Using Codex components
To use a component, import it from this package:
// If using ES modules:
import { CdxButton } from '@wikimedia/codex';
// or, if using CommonJS:
const { CdxButton } = require( '@wikimedia/codex' );
then pass it into the components option of your Vue component:
<template>
<div>
<cdx-button action="progressive" type="primary">
Click me!
</cdx-button>
</div>
</template>
<script>
import { defineComponent } from 'vue';
import { CdxButton } from '@wikimedia/codex';
export default defineComponent( {
components: {
CdxButton
},
// ...
} );
</script>