···11+# facet
22+33+`facet` is our internal library for making client apps. Think of it as our version of Tailwind/Nativewind. Yes, it is confusingly clashing with an ATProto text facet, but you can always import it as something else.
44+55+## Usage
66+77+`facet` provides the following hooks to help make building a consistent design easier.
88+99+- `useFacet()`, which provides the entire Facet library object, containing all the values listed below.
1010+- `useVariant()`, which provides a `FacetVariant` object containing the colours defined for our application based on a `FacetPalette` object.
1111+- `useAtoms()`, which provides a `FacetAtoms` object, containing consistent values for shadows, borders, radii, layout, and positioning.
1212+- `useTypography()`, which provides a `FacetTypography` object, containing consistent values for all things text-related.
1313+1414+`facet` also exports a provider, the `FacetProvider`, which must be wrapped around the root of your application (or similar) to access the values.
1515+1616+## Setup
1717+1818+1. Create a new `Facet` by calling the generator and providing any options in the shape of a `FacetOpts` object. `const facet = generateFacet()`.
1919+2. Provide the `Facet` as a prop to the `FacetProvider`. `<FacetProvider facet={facet}>...</FacetProvider>`
2020+3. Use the hooks elsewhere in your application.
2121+2222+## Configuration
2323+2424+If no options object is passed to the `Facet` constructor, it will use the values defined for Gemstone's client app. In general, any value not passed in the initial constructor object will be replaced with these values as well.